Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(641)

Unified Diff: ppapi/tests/test_query_policy.cc

Issue 8275012: Remove RemoteAccessClientFirewallTraversal policy and code paths. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Re-rebase Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/tests/test_query_policy.h ('k') | ppapi/thunk/interfaces_ppb_public_dev.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/tests/test_query_policy.cc
diff --git a/ppapi/tests/test_query_policy.cc b/ppapi/tests/test_query_policy.cc
deleted file mode 100644
index 87fba20e2a936b5369b9e0ef4f23f3f0dc18bdb8..0000000000000000000000000000000000000000
--- a/ppapi/tests/test_query_policy.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ppapi/tests/test_query_policy.h"
-
-#include "ppapi/c/dev/ppb_query_policy_dev.h"
-#include "ppapi/c/dev/ppp_policy_update_dev.h"
-#include "ppapi/cpp/instance.h"
-#include "ppapi/cpp/module.h"
-#include "ppapi/cpp/var.h"
-#include "ppapi/tests/test_utils.h"
-#include "ppapi/tests/testing_instance.h"
-
-REGISTER_TEST_CASE(QueryPolicy);
-
-namespace {
-
-// Since this is a unittest, we don't care about a global string.
-std::string g_received_policy;
-
-void PolicyUpdated(PP_Instance instance, PP_Var pp_policy_json) {
- g_received_policy = pp::Var(pp::Var::DontManage(), pp_policy_json).AsString();
- GetTestingInterface()->QuitMessageLoop(instance);
-}
-
-static PPP_PolicyUpdate_Dev policy_updated_interface = {
- &PolicyUpdated,
-};
-
-} // namespace
-
-bool TestQueryPolicy::Init() {
- query_policy_interface_ = static_cast<PPB_QueryPolicy_Dev const*>(
- pp::Module::Get()->GetBrowserInterface(PPB_QUERYPOLICY_DEV_INTERFACE));
- pp::Module::Get()->AddPluginInterface(PPP_POLICYUPDATE_DEV_INTERFACE,
- &policy_updated_interface);
-
- return query_policy_interface_ && InitTestingInterface();
-}
-
-void TestQueryPolicy::RunTest() {
- RUN_TEST(SubscribeToPolicyUpdates);
-}
-
-std::string TestQueryPolicy::TestSubscribeToPolicyUpdates() {
- query_policy_interface_->SubscribeToPolicyUpdates(
- instance_->pp_instance());
-
- // Wait for a response on PPP_PolicyUpdate_Dev.
- GetTestingInterface()->RunMessageLoop(instance_->pp_instance());
-
- ASSERT_FALSE(g_received_policy.empty());
-
- PASS();
-}
« no previous file with comments | « ppapi/tests/test_query_policy.h ('k') | ppapi/thunk/interfaces_ppb_public_dev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698