Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Issue 10951016: Fixing up measurement test. (Closed)

Created:
8 years, 3 months ago by blois
Modified:
8 years, 3 months ago
Reviewers:
vsm, Emily Fortuna, Jacob
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Fixing up measurement test. The test was trying to validate that postMessage is called back before setTimeout(0), but there is no guarantee of this by the browsers and the behavior is inconsistent (even within the context of a single browser). BUG=1940 Committed: https://code.google.com/p/dart/source/detail?r=12723

Patch Set 1 #

Patch Set 2 : Changed measurement callbacks to use mutation observers to call back immediately after the current … #

Patch Set 3 : Adding missing files. #

Total comments: 4

Patch Set 4 : Syncing to head. #

Patch Set 5 : Removing static modifier from isMutationObserverSupported. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+354 lines, -98 lines) Patch
M lib/html/dart2js/html_dart2js.dart View 3 chunks +117 lines, -27 lines 0 comments Download
M lib/html/dartium/html_dartium.dart View 3 chunks +117 lines, -27 lines 0 comments Download
M lib/html/src/Measurement.dart View 1 2 chunks +106 lines, -27 lines 0 comments Download
A + lib/html/src/dart2js_MutationObserverSupported.dart View 1 2 3 4 1 chunk +5 lines, -8 lines 0 comments Download
A + lib/html/src/dartium_MutationObserverSupported.dart View 1 2 3 4 1 chunk +6 lines, -3 lines 0 comments Download
M lib/html/templates/html/dart2js/html_dart2js.darttemplate View 1 1 chunk +1 line, -0 lines 0 comments Download
M lib/html/templates/html/dartium/html_dartium.darttemplate View 1 1 chunk +1 line, -0 lines 0 comments Download
M tests/html/html.status View 1 2 3 3 chunks +0 lines, -3 lines 0 comments Download
M tests/html/measurement_test.dart View 1 1 chunk +1 line, -3 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
blois
8 years, 3 months ago (2012-09-18 21:03:03 UTC) #1
Emily Fortuna
lgtm. Thanks for tracking this down!
8 years, 3 months ago (2012-09-18 21:19:30 UTC) #2
vsm
[+jacobr who i think wrote the original test] Jacob: I think I asked you this ...
8 years, 3 months ago (2012-09-19 15:43:59 UTC) #3
blois
It seems like it should be fired before setTimeout(0), but the underlying mechanism uses postMessage ...
8 years, 3 months ago (2012-09-19 16:28:10 UTC) #4
blois
Changing test back closer to original form, but using MutationObservers to generate the callbacks, per ...
8 years, 3 months ago (2012-09-20 16:59:14 UTC) #5
vsm
lgtm! https://chromiumcodereview.appspot.com/10951016/diff/8001/lib/html/src/Measurement.dart File lib/html/src/Measurement.dart (right): https://chromiumcodereview.appspot.com/10951016/diff/8001/lib/html/src/Measurement.dart#newcode86 lib/html/src/Measurement.dart:86: this._onCallback(); Should this check for a "DART-MEASURE" message? ...
8 years, 3 months ago (2012-09-21 15:12:40 UTC) #6
blois
8 years, 3 months ago (2012-09-21 17:00:03 UTC) #7
https://codereview.chromium.org/10951016/diff/8001/lib/html/src/Measurement.dart
File lib/html/src/Measurement.dart (right):

https://codereview.chromium.org/10951016/diff/8001/lib/html/src/Measurement.d...
lib/html/src/Measurement.dart:86: this._onCallback();
On 2012/09/21 15:12:40, vsm wrote:
> Should this check for a "DART-MEASURE" message?  It actually doesn't seem to
> matter.

Nope, there's a comment where it sends the message- since this is just looking
for the next message, it triggers off of any message.

https://codereview.chromium.org/10951016/diff/8001/lib/html/src/dart2js_Mutat...
File lib/html/src/dart2js_MutationObserverSupported.dart (right):

https://codereview.chromium.org/10951016/diff/8001/lib/html/src/dart2js_Mutat...
lib/html/src/dart2js_MutationObserverSupported.dart:9: static bool
_isMutationObserverSupported() native '''
On 2012/09/21 15:12:40, vsm wrote:
> We should think of a better and user-accessible pattern for this type of
check.

Agree- generalizing a mechanism for checking whether features are supported is
for a later milestone.

Powered by Google App Engine
This is Rietveld 408576698