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

Side by Side Diff: ppapi/tests/test_network_proxy.cc

Issue 17094022: PPAPI: Add permissions checking for PPB_NetworkProxy (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge, appease Clang Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/browser/renderer_host/pepper/pepper_network_proxy_host.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ppapi/tests/test_network_proxy.h" 5 #include "ppapi/tests/test_network_proxy.h"
6 6
7 #include "ppapi/cpp/dev/network_proxy_dev.h" 7 #include "ppapi/cpp/dev/network_proxy_dev.h"
8 #include "ppapi/cpp/instance.h" 8 #include "ppapi/cpp/instance.h"
9 #include "ppapi/cpp/var.h" 9 #include "ppapi/cpp/var.h"
10 #include "ppapi/tests/testing_instance.h" 10 #include "ppapi/tests/testing_instance.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 output = callback.output(); 52 output = callback.output();
53 ASSERT_TRUE(output.is_string()); 53 ASSERT_TRUE(output.is_string());
54 // Should get "DIRECT" for file:// URLs. 54 // Should get "DIRECT" for file:// URLs.
55 ASSERT_EQ("DIRECT", output.AsString()); 55 ASSERT_EQ("DIRECT", output.AsString());
56 56
57 callback.WaitForResult( 57 callback.WaitForResult(
58 pp::NetworkProxy::GetProxyForURL(instance_, 58 pp::NetworkProxy::GetProxyForURL(instance_,
59 pp::Var("this isn't a url"), 59 pp::Var("this isn't a url"),
60 callback.GetCallback())); 60 callback.GetCallback()));
61 CHECK_CALLBACK_BEHAVIOR(callback); 61 CHECK_CALLBACK_BEHAVIOR(callback);
62 // TODO(dmichael): Use bad address when it's available.
63 ASSERT_EQ(PP_ERROR_BADARGUMENT, callback.result()); 62 ASSERT_EQ(PP_ERROR_BADARGUMENT, callback.result());
64 // TODO(dmichael): Add this check below when crbug.com/250046 is fixed. 63 // TODO(dmichael): Add this check below when crbug.com/250046 is fixed.
65 // ASSERT_TRUE(callback.output().is_undefined()); 64 // ASSERT_TRUE(callback.output().is_undefined());
66 65
67 callback.WaitForResult( 66 callback.WaitForResult(
68 pp::NetworkProxy::GetProxyForURL(instance_, 67 pp::NetworkProxy::GetProxyForURL(instance_,
69 pp::Var(42), // non-string Var 68 pp::Var(42), // non-string Var
70 callback.GetCallback())); 69 callback.GetCallback()));
71 CHECK_CALLBACK_BEHAVIOR(callback); 70 CHECK_CALLBACK_BEHAVIOR(callback);
72 ASSERT_EQ(PP_ERROR_BADARGUMENT, callback.result()); 71 ASSERT_EQ(PP_ERROR_BADARGUMENT, callback.result());
73 // TODO(dmichael): Add this check below when crbug.com/250046 is fixed. 72 // TODO(dmichael): Add this check below when crbug.com/250046 is fixed.
74 // ASSERT_TRUE(callback.output().is_undefined()); 73 // ASSERT_TRUE(callback.output().is_undefined());
75 74
76 PASS(); 75 PASS();
77 } 76 }
OLDNEW
« no previous file with comments | « content/browser/renderer_host/pepper/pepper_network_proxy_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698