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

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

Issue 497773004: IDL: Remove support for [LogPreviousValue] extended attribute (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebased Created 6 years, 3 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
« no previous file with comments | « Source/web/WebDOMActivityLogger.cpp ('k') | public/web/WebDOMActivityLogger.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 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/core/v8/ScriptController.h" 8 #include "bindings/core/v8/ScriptController.h"
9 #include "bindings/core/v8/V8DOMActivityLogger.h" 9 #include "bindings/core/v8/V8DOMActivityLogger.h"
10 #include "web/WebLocalFrameImpl.h" 10 #include "web/WebLocalFrameImpl.h"
(...skipping 15 matching lines...) Expand all
26 void logGetter(const String& apiName) OVERRIDE 26 void logGetter(const String& apiName) OVERRIDE
27 { 27 {
28 m_loggedActivities.append(apiName); 28 m_loggedActivities.append(apiName);
29 } 29 }
30 30
31 void logSetter(const String& apiName, const v8::Handle<v8::Value>& newValue) OVERRIDE 31 void logSetter(const String& apiName, const v8::Handle<v8::Value>& newValue) OVERRIDE
32 { 32 {
33 m_loggedActivities.append(apiName + " | " + toCoreStringWithUndefinedOrN ullCheck(newValue)); 33 m_loggedActivities.append(apiName + " | " + toCoreStringWithUndefinedOrN ullCheck(newValue));
34 } 34 }
35 35
36 void logSetter(const String& apiName, const v8::Handle<v8::Value>& newValue, const v8::Handle<v8::Value>& oldValue) OVERRIDE
37 {
38 m_loggedActivities.append(apiName + " | " + toCoreStringWithUndefinedOrN ullCheck(oldValue) + " | " + toCoreStringWithUndefinedOrNullCheck(newValue));
39 }
40
41 void logMethod(const String& apiName, int argc, const v8::Handle<v8::Value>* argv) OVERRIDE 36 void logMethod(const String& apiName, int argc, const v8::Handle<v8::Value>* argv) OVERRIDE
42 { 37 {
43 String activityString = apiName; 38 String activityString = apiName;
44 for (int i = 0; i < argc; i++) 39 for (int i = 0; i < argc; i++)
45 activityString = activityString + " | " + toCoreStringWithUndefinedO rNullCheck(argv[i]); 40 activityString = activityString + " | " + toCoreStringWithUndefinedO rNullCheck(argv[i]);
46 m_loggedActivities.append(activityString); 41 m_loggedActivities.append(activityString);
47 } 42 }
48 43
49 void logEvent(const String& eventName, int argc, const String* argv) OVERRID E 44 void logEvent(const String& eventName, int argc, const String* argv) OVERRID E
50 { 45 {
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 "blinkAddElement | script | data:text/html;charset=utf-8,D\n" 482 "blinkAddElement | script | data:text/html;charset=utf-8,D\n"
488 "blinkRequestResource | Script | data:text/html;charset=utf-8,D\n" 483 "blinkRequestResource | Script | data:text/html;charset=utf-8,D\n"
489 "blinkRequestResource | XMLHttpRequest | data:text/html;charset=utf-8,E" ; 484 "blinkRequestResource | XMLHttpRequest | data:text/html;charset=utf-8,E" ;
490 executeScriptInMainWorld(code); 485 executeScriptInMainWorld(code);
491 ASSERT_TRUE(verifyActivities("")); 486 ASSERT_TRUE(verifyActivities(""));
492 executeScriptInIsolatedWorld(code); 487 executeScriptInIsolatedWorld(code);
493 ASSERT_TRUE(verifyActivities(expectedActivities)); 488 ASSERT_TRUE(verifyActivities(expectedActivities));
494 } 489 }
495 490
496 } // namespace 491 } // namespace
OLDNEW
« no previous file with comments | « Source/web/WebDOMActivityLogger.cpp ('k') | public/web/WebDOMActivityLogger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698