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

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

Issue 8536031: Reland http://codereview.chromium.org/8477015 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge AGAIN Created 9 years, 1 month 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 | « ppapi/tests/test_instance_deprecated.h ('k') | ppapi/tests/test_memory.h » ('j') | 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) 2010 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_instance_deprecated.h" 5 #include "ppapi/tests/test_instance_deprecated.h"
6 6
7 #include "ppapi/cpp/module.h" 7 #include "ppapi/cpp/module.h"
8 #include "ppapi/cpp/dev/scriptable_object_deprecated.h" 8 #include "ppapi/cpp/dev/scriptable_object_deprecated.h"
9 #include "ppapi/tests/testing_instance.h" 9 #include "ppapi/tests/testing_instance.h"
10 10
11 namespace { 11 namespace {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 70
71 REGISTER_TEST_CASE(Instance); 71 REGISTER_TEST_CASE(Instance);
72 72
73 TestInstance::TestInstance(TestingInstance* instance) : TestCase(instance) { 73 TestInstance::TestInstance(TestingInstance* instance) : TestCase(instance) {
74 } 74 }
75 75
76 bool TestInstance::Init() { 76 bool TestInstance::Init() {
77 return true; 77 return true;
78 } 78 }
79 79
80 void TestInstance::RunTest() { 80 void TestInstance::RunTests(const std::string& filter) {
81 RUN_TEST(ExecuteScript); 81 RUN_TEST(ExecuteScript, filter);
82 } 82 }
83 83
84 pp::deprecated::ScriptableObject* TestInstance::CreateTestObject() { 84 pp::deprecated::ScriptableObject* TestInstance::CreateTestObject() {
85 return new InstanceSO(this); 85 return new InstanceSO(this);
86 } 86 }
87 87
88 std::string TestInstance::TestExecuteScript() { 88 std::string TestInstance::TestExecuteScript() {
89 // Simple call back into the plugin. 89 // Simple call back into the plugin.
90 pp::Var exception; 90 pp::Var exception;
91 pp::Var ret = instance_->ExecuteScript( 91 pp::Var ret = instance_->ExecuteScript(
(...skipping 21 matching lines...) Expand all
113 //ASSERT_TRUE(exception.AsString() == "plugin exception"); 113 //ASSERT_TRUE(exception.AsString() == "plugin exception");
114 114
115 // Exception caused by string evaluation should be caught. 115 // Exception caused by string evaluation should be caught.
116 exception = pp::Var(); 116 exception = pp::Var();
117 ret = instance_->ExecuteScript("document.doesntExist()", &exception); 117 ret = instance_->ExecuteScript("document.doesntExist()", &exception);
118 ASSERT_TRUE(ret.is_undefined()); 118 ASSERT_TRUE(ret.is_undefined());
119 ASSERT_TRUE(exception.is_string()); // Don't know exactly what it will say. 119 ASSERT_TRUE(exception.is_string()); // Don't know exactly what it will say.
120 120
121 PASS(); 121 PASS();
122 } 122 }
OLDNEW
« no previous file with comments | « ppapi/tests/test_instance_deprecated.h ('k') | ppapi/tests/test_memory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698