| 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 18 matching lines...) Expand all  Loading... | 
| 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  Loading... | 
| 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 | 
| OLD | NEW | 
|---|