Bug 135732 - Web Inspector: run-webkit-tests --debug loads inspector resources from the Release bundle
Summary: Web Inspector: run-webkit-tests --debug loads inspector resources from the Re...
Status: RESOLVED WORKSFORME
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-08-07 15:48 PDT by Brian Burg
Modified: 2015-07-18 12:50 PDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Burg 2014-08-07 15:48:58 PDT
This may be the cause of many debug test failures, if it's not just my machine acting up.

To reproduce (both WK1 and WK2):

1. Run LayoutTests/inspector/test-harness-trivially-works.html in Release.
2. Add some frivolous logging to the test.
3. Rebuild only the release build.
4. The logging appears when running tests for both debug and release builds.


The relevant code for the WK2 path is in WebInspectorProxy.mm:

String WebInspectorProxy::inspectorTestPageURL() const
{
    // Call the soft link framework function to dlopen it, then [NSBundle bundleWithIdentifier:] will work.
    WebInspectorUILibrary();

    NSString *path = [[NSBundle bundleWithIdentifier:@"com.apple.WebInspectorUI"] pathForResource:@"Test" ofType:@"html"];

    // We might not have a Test.html in Production builds.
    if (!path)
        return String();

    return [[NSURL fileURLWithPath:path] absoluteString];
}
Comment 1 Radar WebKit Bug Importer 2014-08-07 15:49:16 PDT
<rdar://problem/17952129>
Comment 2 Brian Burg 2014-08-07 15:54:20 PDT
It's also possible that run-webkit-tests is showing stale results in the results screen, somehow. Which would make it seem that it is loading files from the wrong build.