Last Comment Bug 752319 - Use testharness.js for the cross-origin localStorage tests
: Use testharness.js for the cross-origin localStorage tests
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla15
Assigned To: :Ms2ger (⌚ UTC+1/+2)
:
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-06 07:59 PDT by :Ms2ger (⌚ UTC+1/+2)
Modified: 2012-05-18 02:48 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch v1 (11.41 KB, patch)
2012-05-06 07:59 PDT, :Ms2ger (⌚ UTC+1/+2)
honzab.moz: review-
Details | Diff | Splinter Review
Patch v2 (12.29 KB, patch)
2012-05-07 10:12 PDT, :Ms2ger (⌚ UTC+1/+2)
honzab.moz: review+
Details | Diff | Splinter Review

Description :Ms2ger (⌚ UTC+1/+2) 2012-05-06 07:59:44 PDT
Created attachment 621423 [details] [diff] [review]
Patch v1

I'd like to submit those to the W3C test suite, so they need to use testharness.js (<http://w3c-test.org/resources/testharness.js>). Could you have a look?
Comment 1 Honza Bambas (:mayhemer) 2012-05-07 09:39:19 PDT
Comment on attachment 621423 [details] [diff] [review]
Patch v1

Review of attachment 621423 [details] [diff] [review]:
-----------------------------------------------------------------

r=honzab

Looks good.

::: dom/tests/mochitest/localstorage/interOriginTest2.js
@@ +1,1 @@
> +var t = async_test(document.title);

So, this ensures the asynchronicity and allows removal of SimpleTest.waitForExplicitFinish() from the main page?

@@ +45,5 @@
>  
>      // Any other message indicates error, succes or todo message of a test
>      default:
> +      t.step(function() {
> +        assert_true(!event.data.match(failureRegExp), event.data);

So we no longer has TODOs?
Comment 2 Honza Bambas (:mayhemer) 2012-05-07 09:42:27 PDT
Comment on attachment 621423 [details] [diff] [review]
Patch v1

Too early pressed enter....

I cannot run http://mochi.test:8888/tests/dom/tests/mochitest/localstorage/test_keySync.html it self w/ this patch.
Comment 3 :Ms2ger (⌚ UTC+1/+2) 2012-05-07 10:12:47 PDT
Created attachment 621646 [details] [diff] [review]
Patch v2

This should give you logs when running tests on their own. I also removed remnants of the todo support, as we don't have any left.
Comment 4 Honza Bambas (:mayhemer) 2012-05-10 09:40:13 PDT
Comment on attachment 621646 [details] [diff] [review]
Patch v2

Review of attachment 621646 [details] [diff] [review]:
-----------------------------------------------------------------

So, all tests using testharness.js needs to define <div id="log"></div>.  Good to know.
Comment 5 :Ms2ger (⌚ UTC+1/+2) 2012-05-18 02:48:58 PDT
https://hg.mozilla.org/mozilla-central/rev/75a6378de201

Note You need to log in before you can comment on or make changes to this bug.