mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-07 00:08:39 +09:00
import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo
This commit is contained in:
commit
dcd9973243
150858 changed files with 23884658 additions and 0 deletions
|
|
@ -0,0 +1,24 @@
|
|||
#include "safebrowsing.pb.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
TEST(SafeBrowsingProtobuf, Empty)
|
||||
{
|
||||
using namespace mozilla::safebrowsing;
|
||||
|
||||
const std::string CLIENT_ID = "firefox";
|
||||
|
||||
// Construct a simple update request.
|
||||
FetchThreatListUpdatesRequest r;
|
||||
r.set_allocated_client(new ClientInfo());
|
||||
r.mutable_client()->set_client_id(CLIENT_ID);
|
||||
|
||||
// Then serialize.
|
||||
std::string s;
|
||||
r.SerializeToString(&s);
|
||||
|
||||
// De-serialize.
|
||||
FetchThreatListUpdatesRequest r2;
|
||||
r2.ParseFromString(s);
|
||||
|
||||
ASSERT_EQ(r2.client().client_id(), CLIENT_ID);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue