OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_case.h" | 5 #include "ppapi/tests/test_case.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "ppapi/tests/test_utils.h" | 9 #include "ppapi/tests/test_utils.h" |
10 #include "ppapi/tests/testing_instance.h" | 10 #include "ppapi/tests/testing_instance.h" |
11 | 11 |
12 TestCase::TestCase(TestingInstance* instance) | 12 TestCase::TestCase(TestingInstance* instance) |
13 : instance_(instance), | 13 : instance_(instance), |
14 testing_interface_(NULL) { | 14 testing_interface_(NULL), |
| 15 force_async_(false) { |
15 } | 16 } |
16 | 17 |
17 TestCase::~TestCase() { | 18 TestCase::~TestCase() { |
18 } | 19 } |
19 | 20 |
20 // static | 21 // static |
21 std::string TestCase::MakeFailureMessage(const char* file, | 22 std::string TestCase::MakeFailureMessage(const char* file, |
22 int line, | 23 int line, |
23 const char* cmd) { | 24 const char* cmd) { |
24 // The mere presence of this local variable works around a gcc-4.2.4 | 25 // The mere presence of this local variable works around a gcc-4.2.4 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 pp::Var window = instance_->GetWindowObject(); | 68 pp::Var window = instance_->GetWindowObject(); |
68 pp::Var location = window.GetProperty("location"); | 69 pp::Var location = window.GetProperty("location"); |
69 pp::Var protocol = location.GetProperty("protocol"); | 70 pp::Var protocol = location.GetProperty("protocol"); |
70 if (!protocol.is_string() || protocol.AsString() != "http:") { | 71 if (!protocol.is_string() || protocol.AsString() != "http:") { |
71 instance_->AppendError("This test needs to be run over HTTP."); | 72 instance_->AppendError("This test needs to be run over HTTP."); |
72 return false; | 73 return false; |
73 } | 74 } |
74 | 75 |
75 return true; | 76 return true; |
76 } | 77 } |
OLD | NEW |