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/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 Loading... |
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 Loading... |
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 |
OLD | NEW |