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

Unified Diff: ppapi/tests/test_url_util.cc

Issue 23444004: Add GetPluginRefererURL to PPB_URLUtil_Dev interface to get the 'Referer' HTTP header value that wa… (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 3 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_url_util.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_url_util.cc
===================================================================
--- ppapi/tests/test_url_util.cc (revision 221828)
+++ ppapi/tests/test_url_util.cc (working copy)
@@ -28,6 +28,7 @@
RUN_TEST(DocumentCanAccessDocument, filter);
RUN_TEST(GetDocumentURL, filter);
RUN_TEST(GetPluginInstanceURL, filter);
+ RUN_TEST(GetPluginReferrerURL, filter);
}
std::string TestURLUtil::TestCanonicalize() {
@@ -136,3 +137,14 @@
ASSERT_EQ(url.AsString(), "http://a.b.c/test");
PASS();
}
+
+std::string TestURLUtil::TestGetPluginReferrerURL() {
+ pp::Var url = util_->GetPluginReferrerURL(instance_);
+ ASSERT_TRUE(url.is_string());
+ pp::VarPrivate window = instance_->GetWindowObject();
+ pp::Var href = window.GetProperty("location").GetProperty("href");
+ ASSERT_TRUE(href.is_string());
+ ASSERT_EQ(url.AsString(), href.AsString());
+ PASS();
+}
+
« no previous file with comments | « ppapi/tests/test_url_util.h ('k') | ppapi/thunk/interfaces_ppb_public_dev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698