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

Unified Diff: ppapi/tests/test_case.cc

Issue 7312008: Porting ppapi_tests framework to postMessage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Disable Scrollbar test on Mac for now, merge 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
diff --git a/ppapi/tests/test_case.cc b/ppapi/tests/test_case.cc
index 1d91ef55663f71899796abd5f1ef00b66fe6a1f4..15f24f0577f88f6644305e36d79003a1258c66e5 100644
--- a/ppapi/tests/test_case.cc
+++ b/ppapi/tests/test_case.cc
@@ -35,20 +35,24 @@ std::string TestCase::MakeFailureMessage(const char* file,
return output.str();
}
-pp::Var TestCase::GetTestObject() {
+#if !(defined __native_client__)
+pp::VarPrivate TestCase::GetTestObject() {
if (test_object_.is_undefined()) {
pp::deprecated::ScriptableObject* so = CreateTestObject();
if (so)
- test_object_ = pp::Var(instance_, so); // Takes ownership.
+ test_object_ = pp::VarPrivate(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();
@@ -65,10 +69,7 @@ bool TestCase::InitTestingInterface() {
}
bool TestCase::EnsureRunningOverHTTP() {
- pp::Var window = instance_->GetWindowObject();
- pp::Var location = window.GetProperty("location");
- pp::Var protocol = location.GetProperty("protocol");
- if (!protocol.is_string() || protocol.AsString() != "http:") {
+ if (instance_->protocol() != "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