| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "config.h" | 5 #include "config.h" |
| 6 | 6 |
| 7 #include "FrameTestHelpers.h" | 7 #include "FrameTestHelpers.h" |
| 8 #include "bindings/v8/ScriptController.h" | 8 #include "bindings/v8/ScriptController.h" |
| 9 #include "bindings/v8/V8DOMActivityLogger.h" | 9 #include "bindings/v8/V8DOMActivityLogger.h" |
| 10 #include "web/WebLocalFrameImpl.h" | 10 #include "web/WebLocalFrameImpl.h" |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 Vector<ScriptSourceCode> sources; | 86 Vector<ScriptSourceCode> sources; |
| 87 sources.append(ScriptSourceCode(script)); | 87 sources.append(ScriptSourceCode(script)); |
| 88 Vector<v8::Local<v8::Value> > results; | 88 Vector<v8::Local<v8::Value> > results; |
| 89 m_scriptController->executeScriptInIsolatedWorld(isolatedWorldId, source
s, extensionGroup, 0); | 89 m_scriptController->executeScriptInIsolatedWorld(isolatedWorldId, source
s, extensionGroup, 0); |
| 90 runPendingTasks(); | 90 runPendingTasks(); |
| 91 } | 91 } |
| 92 | 92 |
| 93 bool verifyActivities(const String& activities) | 93 bool verifyActivities(const String& activities) |
| 94 { | 94 { |
| 95 Vector<String> activityVector; | 95 Vector<String> activityVector; |
| 96 activities.split("\n", activityVector); | 96 activities.split('\n', activityVector); |
| 97 return m_activityLogger->verifyActivities(activityVector); | 97 return m_activityLogger->verifyActivities(activityVector); |
| 98 } | 98 } |
| 99 | 99 |
| 100 private: | 100 private: |
| 101 static const int isolatedWorldId = 1; | 101 static const int isolatedWorldId = 1; |
| 102 static const int extensionGroup = 0; | 102 static const int extensionGroup = 0; |
| 103 | 103 |
| 104 WebViewHelper m_webViewHelper; | 104 WebViewHelper m_webViewHelper; |
| 105 ScriptController* m_scriptController; | 105 ScriptController* m_scriptController; |
| 106 // TestActivityLogger is owned by a static table within V8DOMActivityLogger | 106 // TestActivityLogger is owned by a static table within V8DOMActivityLogger |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 "HTMLFormElement.action | data:text/html;charset=utf-8,\n" | 302 "HTMLFormElement.action | data:text/html;charset=utf-8,\n" |
| 303 "blinkAddElement | form | post | data:text/html;charset=utf-8,\n" | 303 "blinkAddElement | form | post | data:text/html;charset=utf-8,\n" |
| 304 "blinkAddElement | form | post | data:text/html;charset=utf-8,"; | 304 "blinkAddElement | form | post | data:text/html;charset=utf-8,"; |
| 305 executeScriptInMainWorld(code); | 305 executeScriptInMainWorld(code); |
| 306 ASSERT_TRUE(verifyActivities("")); | 306 ASSERT_TRUE(verifyActivities("")); |
| 307 executeScriptInIsolatedWorld(code); | 307 executeScriptInIsolatedWorld(code); |
| 308 ASSERT_TRUE(verifyActivities(expectedActivities)); | 308 ASSERT_TRUE(verifyActivities(expectedActivities)); |
| 309 } | 309 } |
| 310 | 310 |
| 311 } // namespace | 311 } // namespace |
| OLD | NEW |