⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 278690 in webkit


Ignore:
Timestamp:
Jun 9, 2021, 8:23:49 PM (5 years ago)
Author:
Cameron McCormack
Message:

Add window.internals.log()
https://bugs.webkit.org/show_bug.cgi?id=226403

Reviewed by Tim Horton.

window.internals.log() writes output to stderr using WTFLogAlways.
This may be useful for interleaving some output generated from within a
test with WebCore logging, which also goes to stderr. console.log()
doesn't work for this, since that goes to stdout and is captured as
the test output.

  • testing/Internals.cpp:

(WebCore::Internals::log):

  • testing/Internals.h:
  • testing/Internals.idl:
Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r278689 r278690  
     12021-06-09  Cameron McCormack  <heycam@apple.com>
     2
     3        Add window.internals.log()
     4        https://bugs.webkit.org/show_bug.cgi?id=226403
     5
     6        Reviewed by Tim Horton.
     7
     8        window.internals.log() writes output to stderr using WTFLogAlways.
     9        This may be useful for interleaving some output generated from within a
     10        test with WebCore logging, which also goes to stderr. console.log()
     11        doesn't work for this, since that goes to stdout and is captured as
     12        the test output.
     13
     14        * testing/Internals.cpp:
     15        (WebCore::Internals::log):
     16        * testing/Internals.h:
     17        * testing/Internals.idl:
     18
    1192021-06-09  Cathie Chen  <cathiechen@igalia.com>
    220
  • trunk/Source/WebCore/testing/Internals.cpp

    r278618 r278690  
    768768}
    769769
     770void Internals::log(const String& value)
     771{
     772    WTFLogAlways("%s", value.utf8().data());
     773}
     774
    770775bool Internals::isPreloaded(const String& url)
    771776{
  • trunk/Source/WebCore/testing/Internals.h

    r278618 r278690  
    170170    String styleChangeType(Node&);
    171171    String description(JSC::JSValue);
     172    void log(const String&);
    172173
    173174    bool isPreloaded(const String& url);
  • trunk/Source/WebCore/testing/Internals.idl

    r278618 r278690  
    281281    DOMString styleChangeType(Node node);
    282282    DOMString description(any value);
     283    undefined log(DOMString value);
    283284
    284285    // Animated image pausing testing.
Note: See TracChangeset for help on using the changeset viewer.