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

Unified Diff: ppapi/tests/test_case.cc

Issue 7329024: Revert 91859 - Porting ppapi_tests framework to postMessage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 5 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_case.h ('k') | ppapi/tests/test_case.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/tests/test_case.cc
===================================================================
--- ppapi/tests/test_case.cc (revision 91865)
+++ ppapi/tests/test_case.cc (working copy)
@@ -35,24 +35,20 @@
return output.str();
}
-#if !(defined __native_client__)
-pp::VarPrivate TestCase::GetTestObject() {
+pp::Var TestCase::GetTestObject() {
if (test_object_.is_undefined()) {
pp::deprecated::ScriptableObject* so = CreateTestObject();
if (so)
- test_object_ = pp::VarPrivate(instance_, so); // Takes ownership.
+ test_object_ = pp::Var(instance_, so); // Takes ownership.
}
return test_object_;
}
-#endif
void TestCase::HandleMessage(const pp::Var& message_data) {}
-#if !(defined __native_client__)
pp::deprecated::ScriptableObject* TestCase::CreateTestObject() {
return NULL;
}
-#endif
bool TestCase::InitTestingInterface() {
testing_interface_ = GetTestingInterface();
@@ -69,7 +65,10 @@
}
bool TestCase::EnsureRunningOverHTTP() {
- if (instance_->protocol() != "http:") {
+ pp::Var window = instance_->GetWindowObject();
+ pp::Var location = window.GetProperty("location");
+ pp::Var protocol = location.GetProperty("protocol");
+ if (!protocol.is_string() || protocol.AsString() != "http:") {
instance_->AppendError("This test needs to be run over HTTP.");
return false;
}
« no previous file with comments | « ppapi/tests/test_case.h ('k') | ppapi/tests/test_case.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698