Bug 33504

Summary: [Chromium] Re-work webkit_unit_tests so that WebKit is initialized only once
Product: WebKit Reporter: Darin Fisher (:fishd, Google) <fishd>
Component: WebKit Misc.Assignee: Darin Fisher (:fishd, Google) <fishd>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, webkit.review.bot, yaar
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
v1 patch
none
v2 patch (adds a comment) dglazkov: review+

Description Darin Fisher (:fishd, Google) 2010-01-11 17:08:04 PST
[Chromium] Re-work webkit_unit_tests so that WebKit is initialized only once

It was wrong that I re-initialized WebKit for each test case.  That may cause problems down the road since background threads may try to call through to the WebKitClient.

Instead, we should change to only initialize WebKit once.
Comment 1 Darin Fisher (:fishd, Google) 2010-01-11 17:09:13 PST
Created attachment 46321 [details]
v1 patch
Comment 2 Darin Fisher (:fishd, Google) 2010-01-11 17:10:52 PST
Created attachment 46322 [details]
v2 patch (adds a comment)
Comment 3 WebKit Review Bot 2010-01-11 17:11:27 PST
Attachment 46321 [details] did not pass style-queue:

Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1
Skipping input 'WebKit/chromium/tests/WebKitTest.h': Can't open for reading
WebKit/chromium/tests/RunAllTests.cpp:32:  Found other header before WebCore config.h. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
WebKit/chromium/tests/RunAllTests.cpp:34:  Alphabetical sorting problem.  [build/include_order] [4]
WebKit/chromium/tests/KURLTest.cpp:36:  Found other header before a header this file implements. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
Total errors found: 3
Comment 4 WebKit Review Bot 2010-01-11 17:11:56 PST
Attachment 46322 [details] did not pass style-queue:

Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1
Skipping input 'WebKit/chromium/tests/WebKitTest.h': Can't open for reading
WebKit/chromium/tests/RunAllTests.cpp:32:  Found other header before WebCore config.h. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
WebKit/chromium/tests/RunAllTests.cpp:34:  Alphabetical sorting problem.  [build/include_order] [4]
WebKit/chromium/tests/KURLTest.cpp:36:  Found other header before a header this file implements. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
Total errors found: 3
Comment 5 Darin Fisher (:fishd, Google) 2010-01-12 09:42:09 PST
I'm ignoring those style errors.  The style tool gets confused about header usage in WebKit/chromium/*
Comment 6 Dimitri Glazkov (Google) 2010-01-12 09:56:29 PST
Comment on attachment 46322 [details]
v2 patch (adds a comment)

ok.
Comment 7 Darin Fisher (:fishd, Google) 2010-01-12 10:11:55 PST
Landed as http://trac.webkit.org/changeset/53144
Comment 8 Adam Barth 2010-01-13 01:59:49 PST
(In reply to comment #5)
> I'm ignoring those style errors.  The style tool gets confused about header
> usage in WebKit/chromium/*

Is the issue the lack of config.h?  We should fix the style checker not to be confused.