tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

TestBasic.cpp (793B)


      1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
      3 /* This Source Code Form is subject to the terms of the Mozilla Public
      4 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
      5 * You can obtain one at http://mozilla.org/MPL/2.0/. */
      6 
      7 #include "gtest/gtest.h"
      8 
      9 #include "mozilla/_ipdltest/IPDLUnitTest.h"
     10 #include "mozilla/_ipdltest/TestBasicChild.h"
     11 #include "mozilla/_ipdltest/TestBasicParent.h"
     12 
     13 using namespace mozilla::ipc;
     14 
     15 namespace mozilla::_ipdltest {
     16 
     17 IPCResult TestBasicChild::RecvHello() {
     18  EXPECT_TRUE(CanSend());
     19  Close();
     20  EXPECT_FALSE(CanSend());
     21  return IPC_OK();
     22 }
     23 
     24 IPDL_TEST(TestBasic) {
     25  bool ok = mActor->SendHello();
     26  ASSERT_TRUE(ok);
     27 }
     28 
     29 }  // namespace mozilla::_ipdltest