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

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: 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
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 18 matching lines...) Expand all
29 void logGetter(const String& apiName) OVERRIDE 29 void logGetter(const String& apiName) OVERRIDE
30 { 30 {
31 m_loggedActivities.append(apiName); 31 m_loggedActivities.append(apiName);
32 } 32 }
33 33
34 void logSetter(const String& apiName, const v8::Handle<v8::Value>& newValue) OVERRIDE 34 void logSetter(const String& apiName, const v8::Handle<v8::Value>& newValue) OVERRIDE
35 { 35 {
36 m_loggedActivities.append(apiName + " | " + toCoreStringWithUndefinedOrN ullCheck(newValue)); 36 m_loggedActivities.append(apiName + " | " + toCoreStringWithUndefinedOrN ullCheck(newValue));
37 } 37 }
38 38
39 void logSetter(const String& apiName, const v8::Handle<v8::Value>& newValue, const v8::Handle<v8::Value>& oldValue) OVERRIDE
40 {
41 m_loggedActivities.append(apiName + " | " + toCoreStringWithUndefinedOrN ullCheck(oldValue) + " | " + toCoreStringWithUndefinedOrNullCheck(newValue));
42 }
43
44 void logMethod(const String& apiName, int argc, const v8::Handle<v8::Value>* argv) OVERRIDE 39 void logMethod(const String& apiName, int argc, const v8::Handle<v8::Value>* argv) OVERRIDE
45 { 40 {
46 String activityString = apiName; 41 String activityString = apiName;
47 for (int i = 0; i < argc; i++) 42 for (int i = 0; i < argc; i++)
48 activityString = activityString + " | " + toCoreStringWithUndefinedO rNullCheck(argv[i]); 43 activityString = activityString + " | " + toCoreStringWithUndefinedO rNullCheck(argv[i]);
49 m_loggedActivities.append(activityString); 44 m_loggedActivities.append(activityString);
50 } 45 }
51 46
52 void logEvent(const String& eventName, int argc, const String* argv) OVERRID E 47 void logEvent(const String& eventName, int argc, const String* argv) OVERRID E
53 { 48 {
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 "blinkAddElement | script | data:text/html;charset=utf-8,D\n" 485 "blinkAddElement | script | data:text/html;charset=utf-8,D\n"
491 "blinkRequestResource | Script | data:text/html;charset=utf-8,D\n" 486 "blinkRequestResource | Script | data:text/html;charset=utf-8,D\n"
492 "blinkRequestResource | XMLHttpRequest | data:text/html;charset=utf-8,E" ; 487 "blinkRequestResource | XMLHttpRequest | data:text/html;charset=utf-8,E" ;
493 executeScriptInMainWorld(code); 488 executeScriptInMainWorld(code);
494 ASSERT_TRUE(verifyActivities("")); 489 ASSERT_TRUE(verifyActivities(""));
495 executeScriptInIsolatedWorld(code); 490 executeScriptInIsolatedWorld(code);
496 ASSERT_TRUE(verifyActivities(expectedActivities)); 491 ASSERT_TRUE(verifyActivities(expectedActivities));
497 } 492 }
498 493
499 } // namespace 494 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698