Removing references to gecko user agent in favor of gecko1_8. gecko refers to very old versions of Mozilla, while gecko1_8 refers to all modern versions, including all versions of Firefox 2.0 and later. gecko was used to support the old version of hosted mode on Linux, which has long since been replaced by the dev mode plugin for Firefox.
Review at http://gwt-code-reviews.appspot.com/1081801
Review by: pdr@google.com
git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@9216 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/tools/api-checker/config/gwt21_22userApi.conf b/tools/api-checker/config/gwt21_22userApi.conf
index 1e4b426..237247f 100644
--- a/tools/api-checker/config/gwt21_22userApi.conf
+++ b/tools/api-checker/config/gwt21_22userApi.conf
@@ -132,3 +132,8 @@
com.google.gwt.user.client.ui.Label::setHTML(Lcom/google/gwt/safehtml/shared/SafeHtml;Lcom/google/gwt/i18n/client/HasDirection$Direction;) MISSING
com.google.gwt.user.client.ui.Label::setTextOrHtml(Ljava/lang/String;Lcom/google/gwt/i18n/client/HasDirection$Direction;Z) MISSING
com.google.gwt.user.client.ui.Label::setTextOrHtml(Ljava/lang/String;Z) MISSING
+
+# Removing the gecko user agent and associated deferred bindings for 2.1.1.
+com.google.gwt.user.client.impl.DOMImplMozillaOld MISSING
+com.google.gwt.user.client.ui.impl.RichTextAreaImplOldMozilla MISSING
+com.google.gwt.xml.client.impl.XMLParserImplMozillaOld MISSING
diff --git a/user/src/com/google/gwt/core/CoreWithUserAgent.gwt.xml b/user/src/com/google/gwt/core/CoreWithUserAgent.gwt.xml
index e97591c..bc1d3d8 100644
--- a/user/src/com/google/gwt/core/CoreWithUserAgent.gwt.xml
+++ b/user/src/com/google/gwt/core/CoreWithUserAgent.gwt.xml
@@ -29,10 +29,7 @@
<replace-with class="com.google.gwt.core.client.impl.StackTraceCreator.CollectorMoz">
<when-type-is class="com.google.gwt.core.client.impl.StackTraceCreator.Collector" />
<when-property-is name="compiler.emulatedStack" value="false" />
- <any>
- <when-property-is name="user.agent" value="gecko" />
- <when-property-is name="user.agent" value="gecko1_8" />
- </any>
+ <when-property-is name="user.agent" value="gecko1_8" />
</replace-with>
<replace-with class="com.google.gwt.core.client.impl.StackTraceCreator.CollectorOpera">
diff --git a/user/src/com/google/gwt/dom/DOM.gwt.xml b/user/src/com/google/gwt/dom/DOM.gwt.xml
index a0cd339..8187682 100644
--- a/user/src/com/google/gwt/dom/DOM.gwt.xml
+++ b/user/src/com/google/gwt/dom/DOM.gwt.xml
@@ -45,11 +45,6 @@
<when-property-is name="user.agent" value="gecko1_8"/>
</replace-with>
- <replace-with class="com.google.gwt.dom.client.DOMImplMozillaOld">
- <when-type-is class="com.google.gwt.dom.client.DOMImpl"/>
- <when-property-is name="user.agent" value="gecko"/>
- </replace-with>
-
<replace-with class="com.google.gwt.dom.client.StyleInjector.StyleInjectorImplIE">
<when-type-is class="com.google.gwt.dom.client.StyleInjector.StyleInjectorImpl"/>
<any>
diff --git a/user/src/com/google/gwt/dom/client/DOMImplMozillaOld.java b/user/src/com/google/gwt/dom/client/DOMImplMozillaOld.java
deleted file mode 100644
index aba6db4..0000000
--- a/user/src/com/google/gwt/dom/client/DOMImplMozillaOld.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Copyright 2008 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.google.gwt.dom.client;
-
-/**
- * DOM implementation differences for older version of Mozilla (mostly the
- * hosted mode browser on linux). The main difference is due to changes in
- * getBoxObjectFor in later versions of mozilla. The relevant bugzilla issues:
- * https://bugzilla.mozilla.org/show_bug.cgi?id=328881
- * https://bugzilla.mozilla.org/show_bug.cgi?id=330619
- */
- class DOMImplMozillaOld extends DOMImplMozilla {
-
- // Used by JSNI to avoid JSO restrictions from JSNI
- @SuppressWarnings("unused")
- private static int getDocumentScrollLeft() {
- return Document.get().getScrollLeft();
- }
-
- // Used by JSNI to avoid JSO restrictions from JSNI
- @SuppressWarnings("unused")
- private static int getDocumentScrollTop() {
- return Document.get().getScrollTop();
- }
-
- @Override
- public int getAbsoluteLeft(Element elem) {
- return getAbsoluteLeftImpl(elem.getOwnerDocument().getViewportElement(),
- elem);
- }
-
- @Override
- public int getAbsoluteTop(Element elem) {
- return getAbsoluteTopImpl(elem.getOwnerDocument().getViewportElement(),
- elem);
- }
-
- @Override
- public native String getInnerText(Element node) /*-{
- // To mimic IE's 'innerText' property in the W3C DOM, we need to recursively
- // concatenate all child text nodes (depth first).
- var text = '', child = node.firstChild;
- while (child) {
- // 1 == Element node
- if (child.nodeType == 1) {
- text += this.@com.google.gwt.dom.client.DOMImpl::getInnerText(Lcom/google/gwt/dom/client/Element;)(child);
- } else if (child.nodeValue) {
- text += child.nodeValue;
- }
- child = child.nextSibling;
- }
- return text;
- }-*/;
-
- @Override
- public native void setInnerText(Element elem, String text) /*-{
- // Remove all children first.
- while (elem.firstChild) {
- elem.removeChild(elem.firstChild);
- }
- // Add a new text node.
- if (text != null) {
- elem.appendChild(elem.ownerDocument.createTextNode(text));
- }
- }-*/;
-
- private native int getAbsoluteLeftImpl(Element viewport, Element elem) /*-{
- var doc = elem.ownerDocument;
- var style = doc.defaultView.getComputedStyle(elem, null);
- var left = doc.getBoxObjectFor(elem).x - Math.round(
- style.getPropertyCSSValue('border-left-width').getFloatValue(
- CSSPrimitiveValue.CSS_PX));
-
- var parent = elem.parentNode;
- while (parent) {
- // Sometimes get NAN.
- if (parent.scrollLeft > 0) {
- left -= parent.scrollLeft;
- }
- parent = parent.parentNode;
- }
-
- return left + viewport.scrollLeft;
- }-*/;
-
- private native int getAbsoluteTopImpl(Element viewport, Element elem) /*-{
- var doc = elem.ownerDocument;
- var style = doc.defaultView.getComputedStyle(elem, null);
- var top = doc.getBoxObjectFor(elem).y - Math.round(
- style.getPropertyCSSValue('border-top-width').getFloatValue(
- CSSPrimitiveValue.CSS_PX));
-
- var parent = elem.parentNode;
- while (parent) {
- // Sometimes get NAN.
- if (parent.scrollTop > 0) {
- top -= parent.scrollTop;
- }
- parent = parent.parentNode;
- }
-
- return top + viewport.scrollTop;
- }-*/;
-}
diff --git a/user/src/com/google/gwt/junit/JUnitMessageQueue.java b/user/src/com/google/gwt/junit/JUnitMessageQueue.java
index 7222b93..e2c4bf7 100644
--- a/user/src/com/google/gwt/junit/JUnitMessageQueue.java
+++ b/user/src/com/google/gwt/junit/JUnitMessageQueue.java
@@ -138,7 +138,7 @@
private final Map<TestInfo, Map<ClientStatus, JUnitResult>> testResults = new HashMap<TestInfo, Map<ClientStatus, JUnitResult>>();
/**
- * A set of the GWT user agents (eg. ie6, gecko) that have connected.
+ * A set of the GWT user agents (eg. ie6, gecko1_8) that have connected.
*/
private final Set<String> userAgents = new HashSet<String>();
diff --git a/user/src/com/google/gwt/junit/JUnitShell.java b/user/src/com/google/gwt/junit/JUnitShell.java
index 5cfc248..cc8f9b4 100644
--- a/user/src/com/google/gwt/junit/JUnitShell.java
+++ b/user/src/com/google/gwt/junit/JUnitShell.java
@@ -483,7 +483,7 @@
@Override
public String getPurpose() {
return "Specify the user agents to reduce the number of permutations for remote browser tests;"
- + " e.g. ie6,ie8,safari,gecko,gecko1_8,opera";
+ + " e.g. ie6,ie8,safari,gecko1_8,opera";
}
@Override
diff --git a/user/src/com/google/gwt/resources/Resources.gwt.xml b/user/src/com/google/gwt/resources/Resources.gwt.xml
index d4c5b83..e685abf 100644
--- a/user/src/com/google/gwt/resources/Resources.gwt.xml
+++ b/user/src/com/google/gwt/resources/Resources.gwt.xml
@@ -51,7 +51,6 @@
<any>
<when-property-is name="user.agent" value="safari" />
<when-property-is name="user.agent" value="opera" />
- <when-property-is name="user.agent" value="gecko" />
<when-property-is name="user.agent" value="gecko1_8" />
<when-property-is name="user.agent" value="ie8" />
</any>
diff --git a/user/src/com/google/gwt/user/CaptionPanel.gwt.xml b/user/src/com/google/gwt/user/CaptionPanel.gwt.xml
index 8a2dda6..0fb4bad 100644
--- a/user/src/com/google/gwt/user/CaptionPanel.gwt.xml
+++ b/user/src/com/google/gwt/user/CaptionPanel.gwt.xml
@@ -23,10 +23,7 @@
<!-- Mozilla has a different implementation to handle rendering issues -->
<replace-with class="com.google.gwt.user.client.ui.CaptionPanel.CaptionPanelImplMozilla">
<when-type-is class="com.google.gwt.user.client.ui.CaptionPanel.CaptionPanelImpl"/>
- <any>
- <when-property-is name="user.agent" value="gecko"/>
- <when-property-is name="user.agent" value="gecko1_8"/>
- </any>
+ <when-property-is name="user.agent" value="gecko1_8"/>
</replace-with>
<!-- Safari has a different implementation to handle rendering issues -->
diff --git a/user/src/com/google/gwt/user/DOM.gwt.xml b/user/src/com/google/gwt/user/DOM.gwt.xml
index 110d6e0..9d3bef5 100644
--- a/user/src/com/google/gwt/user/DOM.gwt.xml
+++ b/user/src/com/google/gwt/user/DOM.gwt.xml
@@ -45,9 +45,4 @@
<when-type-is class="com.google.gwt.user.client.impl.DOMImpl"/>
<when-property-is name="user.agent" value="gecko1_8"/>
</replace-with>
-
- <replace-with class="com.google.gwt.user.client.impl.DOMImplMozillaOld">
- <when-type-is class="com.google.gwt.user.client.impl.DOMImpl"/>
- <when-property-is name="user.agent" value="gecko"/>
- </replace-with>
</module>
diff --git a/user/src/com/google/gwt/user/Focus.gwt.xml b/user/src/com/google/gwt/user/Focus.gwt.xml
index 6a56120..d863ea3 100644
--- a/user/src/com/google/gwt/user/Focus.gwt.xml
+++ b/user/src/com/google/gwt/user/Focus.gwt.xml
@@ -23,10 +23,7 @@
<!-- Firefox uses a hidden input to set accesskeys -->
<replace-with class="com.google.gwt.user.client.ui.impl.FocusImplStandard">
<when-type-is class="com.google.gwt.user.client.ui.impl.FocusImpl"/>
- <any>
- <when-property-is name="user.agent" value="gecko"/>
- <when-property-is name="user.agent" value="gecko1_8"/>
- </any>
+ <when-property-is name="user.agent" value="gecko1_8"/>
</replace-with>
<!-- Safari uses a hidden input to set accesskeys and -->
diff --git a/user/src/com/google/gwt/user/History.gwt.xml b/user/src/com/google/gwt/user/History.gwt.xml
index 3fd787c..1e57001 100644
--- a/user/src/com/google/gwt/user/History.gwt.xml
+++ b/user/src/com/google/gwt/user/History.gwt.xml
@@ -24,10 +24,7 @@
<!-- standard case. -->
<replace-with class="com.google.gwt.user.client.impl.HistoryImplMozilla">
<when-type-is class="com.google.gwt.user.client.impl.HistoryImpl"/>
- <any>
- <when-property-is name="user.agent" value="gecko1_8"/>
- <when-property-is name="user.agent" value="gecko"/>
- </any>
+ <when-property-is name="user.agent" value="gecko1_8"/>
</replace-with>
<!-- Opera has yet another slightly different implementation. -->
diff --git a/user/src/com/google/gwt/user/Popup.gwt.xml b/user/src/com/google/gwt/user/Popup.gwt.xml
index ee886c8..5d9ea1c 100644
--- a/user/src/com/google/gwt/user/Popup.gwt.xml
+++ b/user/src/com/google/gwt/user/Popup.gwt.xml
@@ -23,10 +23,7 @@
<!-- Mozilla needs a different implementation due to issue #410 -->
<replace-with class="com.google.gwt.user.client.ui.impl.PopupImplMozilla">
<when-type-is class="com.google.gwt.user.client.ui.impl.PopupImpl"/>
- <any>
- <when-property-is name="user.agent" value="gecko"/>
- <when-property-is name="user.agent" value="gecko1_8"/>
- </any>
+ <when-property-is name="user.agent" value="gecko1_8"/>
</replace-with>
<!-- IE6 has a completely different popup implementation. It is no longer -->
diff --git a/user/src/com/google/gwt/user/RichText.gwt.xml b/user/src/com/google/gwt/user/RichText.gwt.xml
index a2edcd1..22694d1 100644
--- a/user/src/com/google/gwt/user/RichText.gwt.xml
+++ b/user/src/com/google/gwt/user/RichText.gwt.xml
@@ -37,14 +37,6 @@
<when-property-is name="user.agent" value="gecko1_8" />
</replace-with>
- <!-- Old Mozilla-specific implementation -->
- <replace-with
- class="com.google.gwt.user.client.ui.impl.RichTextAreaImplOldMozilla">
- <when-type-is
- class="com.google.gwt.user.client.ui.impl.RichTextAreaImpl" />
- <when-property-is name="user.agent" value="gecko" />
- </replace-with>
-
<!-- Safari-specific implementation -->
<replace-with
class="com.google.gwt.user.client.ui.impl.RichTextAreaImplSafari">
diff --git a/user/src/com/google/gwt/user/UserAgent.gwt.xml b/user/src/com/google/gwt/user/UserAgent.gwt.xml
index af299b3..1e52cdc 100644
--- a/user/src/com/google/gwt/user/UserAgent.gwt.xml
+++ b/user/src/com/google/gwt/user/UserAgent.gwt.xml
@@ -19,7 +19,7 @@
<module>
<!-- Browser-sensitive code should use the 'user.agent' property -->
- <define-property name="user.agent" values="ie6,ie8,gecko,gecko1_8,safari,opera"/>
+ <define-property name="user.agent" values="ie6,ie8,gecko1_8,safari,opera"/>
<property-provider name="user.agent"><![CDATA[
var ua = navigator.userAgent.toLowerCase();
@@ -44,12 +44,7 @@
}
}
} else if (ua.indexOf("gecko") != -1) {
- var result = /rv:([0-9]+)\.([0-9]+)/.exec(ua);
- if (result && result.length == 3) {
- if (makeVersion(result) >= 1008)
- return "gecko1_8";
- }
- return "gecko";
+ return "gecko1_8";
}
return "unknown";
]]></property-provider>
diff --git a/user/src/com/google/gwt/user/cellview/CellView.gwt.xml b/user/src/com/google/gwt/user/cellview/CellView.gwt.xml
index bb7ffa1..d848672 100644
--- a/user/src/com/google/gwt/user/cellview/CellView.gwt.xml
+++ b/user/src/com/google/gwt/user/cellview/CellView.gwt.xml
@@ -25,7 +25,6 @@
<when-type-is class="com.google.gwt.user.cellview.client.CellBasedWidgetImpl"/>
<any>
<when-property-is name="user.agent" value="opera"/>
- <when-property-is name="user.agent" value="gecko"/>
<when-property-is name="user.agent" value="gecko1_8"/>
</any>
</replace-with>
diff --git a/user/src/com/google/gwt/user/client/impl/DOMImplMozillaOld.java b/user/src/com/google/gwt/user/client/impl/DOMImplMozillaOld.java
deleted file mode 100644
index cbed87e..0000000
--- a/user/src/com/google/gwt/user/client/impl/DOMImplMozillaOld.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright 2008 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.google.gwt.user.client.impl;
-
-/**
- * DOM implementation differences for older version of Mozilla (mostly the
- * hosted mode browser on linux). The main difference is due to changes in
- * getBoxObjectFor in later versions of mozilla. The relevant bugzilla issues:
- * https://bugzilla.mozilla.org/show_bug.cgi?id=328881
- * https://bugzilla.mozilla.org/show_bug.cgi?id=330619
- */
-public class DOMImplMozillaOld extends DOMImplMozilla {
-}
diff --git a/user/src/com/google/gwt/user/client/ui/impl/RichTextAreaImplOldMozilla.java b/user/src/com/google/gwt/user/client/ui/impl/RichTextAreaImplOldMozilla.java
deleted file mode 100644
index d78a4e6..0000000
--- a/user/src/com/google/gwt/user/client/ui/impl/RichTextAreaImplOldMozilla.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright 2010 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.google.gwt.user.client.ui.impl;
-
-import com.google.gwt.user.client.Command;
-import com.google.gwt.user.client.DeferredCommand;
-
-/**
- * Old Mozilla-specific implementation of rich-text editing.
- */
-public class RichTextAreaImplOldMozilla extends RichTextAreaImplMozilla {
- /**
- * The content window cannot be focused immediately after the content window
- * has been loaded, so we need to wait for an additional deferred command.
- */
- @Override
- protected void onElementInitialized() {
- DeferredCommand.addCommand(new Command() {
- public void execute() {
- RichTextAreaImplOldMozilla.super.onElementInitialized();
- }
- });
- }
-
- @Override
- protected void setFirstFocusImpl() {
- setFocusImpl(true);
- }
-
- @Override
- protected void setFocusImpl(boolean focused) {
- // Old Mozilla does not support blur on the content window of an iframe.
- if (focused) {
- super.setFocusImpl(focused);
- }
- }
-}
diff --git a/user/src/com/google/gwt/xml/XML.gwt.xml b/user/src/com/google/gwt/xml/XML.gwt.xml
index 035a447..be76d45 100644
--- a/user/src/com/google/gwt/xml/XML.gwt.xml
+++ b/user/src/com/google/gwt/xml/XML.gwt.xml
@@ -23,11 +23,6 @@
<when-type-is class="com.google.gwt.xml.client.impl.XMLParserImpl"/>
</replace-with>
- <replace-with class="com.google.gwt.xml.client.impl.XMLParserImplMozillaOld">
- <when-type-is class="com.google.gwt.xml.client.impl.XMLParserImpl"/>
- <when-property-is name="user.agent" value="gecko"/>
- </replace-with>
-
<replace-with class="com.google.gwt.xml.client.impl.XMLParserImplOpera">
<when-type-is class="com.google.gwt.xml.client.impl.XMLParserImpl"/>
<when-property-is name="user.agent" value="opera"/>
diff --git a/user/src/com/google/gwt/xml/client/impl/XMLParserImplMozillaOld.java b/user/src/com/google/gwt/xml/client/impl/XMLParserImplMozillaOld.java
deleted file mode 100644
index 4ec63d9..0000000
--- a/user/src/com/google/gwt/xml/client/impl/XMLParserImplMozillaOld.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2008 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.google.gwt.xml.client.impl;
-
-/**
- *
- */
-public class XMLParserImplMozillaOld extends XMLParserImplStandard {
- /* (non-Javadoc)
- * @see com.google.gwt.xml.client.impl.XMLParserImplStandard#toStringImpl(com.google.gwt.xml.client.impl.ProcessingInstructionImpl)
- * Works around a Mozilla bug where serializing an individual processing instruction node deadlocks.
- */
-@Override
- protected String toStringImpl(ProcessingInstructionImpl node) {
- final StringBuffer b = new StringBuffer("<?");
- b.append(node.getNodeName());
- b.append(" ");
- b.append(node.getData());
- b.append("?>");
- return b.toString();
- }
-}
diff --git a/user/test/com/google/gwt/dom/client/ElementTest.java b/user/test/com/google/gwt/dom/client/ElementTest.java
index 5806456..3dc2ec5 100644
--- a/user/test/com/google/gwt/dom/client/ElementTest.java
+++ b/user/test/com/google/gwt/dom/client/ElementTest.java
@@ -267,8 +267,8 @@
// Ensure that the 'position:fixed' div's absolute position includes the
// body's scroll position.
//
- // Don't do this on IE6/7 or old Gecko, which don't support position:fixed.
- if (!isIE6or7() && !isOldGecko()) {
+ // Don't do this on IE6/7, which doesn't support position:fixed.
+ if (!isIE6or7()) {
assertTrue(fixedDiv.getAbsoluteLeft() >= body.getScrollLeft());
assertTrue(fixedDiv.getAbsoluteTop() >= body.getScrollTop());
}
@@ -623,23 +623,4 @@
}
return false;
}-*/;
-
- // Stolen from UserAgent.gwt.xml.
- private native boolean isOldGecko() /*-{
- var makeVersion = function(result) {
- return (parseInt(result[1]) * 1000) + parseInt(result[2]);
- };
-
- var ua = navigator.userAgent.toLowerCase();
- if (ua.indexOf("gecko") != -1) {
- var result = /rv:([0-9]+)\.([0-9]+)/.exec(ua);
- if (result && result.length == 3) {
- if (makeVersion(result) >= 1008) {
- return false;
- }
- }
- return true;
- }
- return false;
- }-*/;
}
diff --git a/user/test/com/google/gwt/junit/JUnitMessageQueueTest.java b/user/test/com/google/gwt/junit/JUnitMessageQueueTest.java
index 2428df8..305e817 100644
--- a/user/test/com/google/gwt/junit/JUnitMessageQueueTest.java
+++ b/user/test/com/google/gwt/junit/JUnitMessageQueueTest.java
@@ -95,7 +95,7 @@
// Add some clients in a few ways.
{
queue.getTestBlock(createClientInfo(0, "ie6"), 0, timeout);
- queue.reportFatalLaunch(createClientInfo(1, "gecko"), null);
+ queue.reportFatalLaunch(createClientInfo(1, "gecko1_8"), null);
queue.reportResults(createClientInfo(2, "safari"), createTestResults(0));
assertEquals(3, queue.getNumConnectedClients());
}
@@ -111,7 +111,7 @@
// Add existing clients.
{
queue.getTestBlock(createClientInfo(0, "ie6"), 0, timeout);
- queue.reportFatalLaunch(createClientInfo(1, "gecko"), null);
+ queue.reportFatalLaunch(createClientInfo(1, "gecko1_8"), null);
queue.reportResults(createClientInfo(2, "safari"), createTestResults(0));
assertEquals(5, queue.getNumConnectedClients());
}
@@ -273,9 +273,9 @@
// Add some clients in a few ways.
{
queue.getTestBlock(createClientInfo(0, "ie6"), 0, timeout);
- queue.reportFatalLaunch(createClientInfo(1, "gecko"), null);
+ queue.reportFatalLaunch(createClientInfo(1, "gecko1_8"), null);
queue.reportResults(createClientInfo(2, "safari"), createTestResults(0));
- assertSimilar(new String[] {"ie6", "gecko", "safari"},
+ assertSimilar(new String[] {"ie6", "gecko1_8", "safari"},
queue.getUserAgents());
}
@@ -285,16 +285,16 @@
queue.reportFatalLaunch(createClientInfo(3, "ie7"), null);
queue.reportResults(createClientInfo(4, "gecko1_8"), createTestResults(0));
queue.getTestBlock(createClientInfo(3, "ie7"), 0, timeout);
- assertSimilar(new String[] {"ie6", "ie7", "gecko", "gecko1_8", "safari"},
+ assertSimilar(new String[] {"ie6", "ie7", "gecko1_8", "safari"},
queue.getUserAgents());
}
// Add existing clients.
{
queue.getTestBlock(createClientInfo(0, "ie6"), 0, timeout);
- queue.reportFatalLaunch(createClientInfo(1, "gecko"), null);
+ queue.reportFatalLaunch(createClientInfo(1, "gecko1_8"), null);
queue.reportResults(createClientInfo(2, "safari"), createTestResults(0));
- assertSimilar(new String[] {"ie6", "ie7", "gecko", "gecko1_8", "safari"},
+ assertSimilar(new String[] {"ie6", "ie7", "gecko1_8", "safari"},
queue.getUserAgents());
}
}
@@ -422,7 +422,7 @@
// Add some clients in a few ways.
{
queue.getTestBlock(createClientInfo(0, "ie6"), 0, timeout);
- queue.reportFatalLaunch(createClientInfo(1, "gecko"), null);
+ queue.reportFatalLaunch(createClientInfo(1, "gecko1_8"), null);
queue.reportResults(createClientInfo(2, "safari"), createTestResults(0));
assertSimilar(new String[] {"desc0", "desc1", "desc2"},
queue.getNewClients());
@@ -442,7 +442,7 @@
// Add existing clients.
{
queue.getTestBlock(createClientInfo(0, "ie6"), 0, timeout);
- queue.reportFatalLaunch(createClientInfo(1, "gecko"), null);
+ queue.reportFatalLaunch(createClientInfo(1, "gecko1_8"), null);
queue.reportResults(createClientInfo(2, "safari"), createTestResults(0));
assertEquals(0, queue.getNewClients().length);
}
diff --git a/user/test/com/google/gwt/user/client/Profile.java b/user/test/com/google/gwt/user/client/Profile.java
index 8a1a45d..7b4bfcb 100644
--- a/user/test/com/google/gwt/user/client/Profile.java
+++ b/user/test/com/google/gwt/user/client/Profile.java
@@ -85,14 +85,8 @@
return "ie6";
}
else if (ua.indexOf("gecko") != -1) {
- var result = /rv:([0-9]+)\.([0-9]+)/.exec(ua);
- if (result && result.length == 3) {
- var version = (parseInt(result[1]) * 10) + parseInt(result[2]);
- if (version >= 18)
- return "gecko1_8";
- }
- return "gecko";
- }
+ return "gecko1_8";
+ }
return "unknown";
-}-*/;
+ }-*/;
}