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

Side by Side Diff: Source/web/tests/ActivityLoggerTest.cpp

Issue 359903002: Call WTFString::split(UChar, Vector&) when possible (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update tests as well Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/platform/graphics/gpu/Extensions3DUtil.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/platform/graphics/gpu/Extensions3DUtil.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698