Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit 9a123fb

Browse files
committed
Backed out changeset 81156ff3f4fa (bug 1571656) for causing browser_PageActions.js and test_insertTree_fixupOrSkipInvalidEntries.js to perma fail CLOSED TREE
1 parent 3e56e9e commit 9a123fb

30 files changed

Lines changed: 63 additions & 83 deletions

File tree

browser/components/migration/tests/unit/test_IE_history.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@ add_task(async function test_IE_history() {
4545
let entry = await PlacesUtils.history.fetch(url, { includeVisits: true });
4646
Assert.equal(entry.url, url, "Should have the correct URL");
4747
Assert.equal(entry.title, title, "Should have the correct title");
48-
Assert.greater(entry.visits.length, 0, "Should have some visits");
48+
Assert.ok(entry.visits.length > 0, "Should have some visits");
4949
}
5050
});

browser/components/places/tests/browser/browser_bookmarkProperties_bookmarkAllTabs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ add_task(async function() {
3838
},
3939
dialog => {
4040
let savedItemId = dialog.gEditItemOverlay.itemId;
41-
Assert.greater(savedItemId, 0, "Found the itemId");
41+
Assert.ok(savedItemId > 0, "Found the itemId");
4242
return PlacesTestUtils.waitForNotification(
4343
"onItemRemoved",
4444
id => id === savedItemId

browser/components/places/tests/browser/browser_library_commands.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ add_task(async function test_query_on_toolbar() {
145145
});
146146

147147
// Get first child and check it is the just inserted query.
148-
Assert.greater(toolbarNode.childCount, 0, "Toolbar node has children");
148+
Assert.ok(toolbarNode.childCount > 0, "Toolbar node has children");
149149
let queryNode = toolbarNode.getChild(0);
150150
Assert.equal(
151151
queryNode.title,

browser/components/places/tests/browser/browser_toolbar_overflow.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ add_task(async function test_separator_first() {
132132
await promiseReady;
133133

134134
let children = gToolbarContent.children;
135-
Assert.greater(children.length, 2, "Multiple elements are visible");
135+
Assert.ok(children.length > 2, "Multiple elements are visible");
136136
Assert.equal(
137137
children[1]._placesNode.uri,
138138
"http://test.places.0/",

browser/components/sessionstore/test/browser_background_tab_crash.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ async function setupBackgroundTabs(testFn) {
8080
* background state.
8181
*/
8282
async function crashBackgroundTabs(tabs) {
83-
Assert.greater(tabs.length, 0, "Need to crash at least one tab.");
83+
Assert.ok(tabs.length > 0, "Need to crash at least one tab.");
8484
for (let tab of tabs) {
8585
Assert.ok(tab.linkedBrowser.isRemoteBrowser, "tab is remote");
8686
}

browser/components/urlbar/tests/browser/browser_restoreEmptyInput.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ add_task(async function test() {
2121
);
2222

2323
let resultCount = UrlbarTestUtils.getResultCount(window);
24-
Assert.greater(resultCount, 0, "At least one result");
24+
Assert.ok(resultCount > 0, "At least one result");
2525

2626
for (let i = 0; i < resultCount; i++) {
2727
EventUtils.synthesizeKey("KEY_ArrowDown");

browser/extensions/pdfjs/test/browser_pdfjs_main.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,7 @@ add_task(async function test() {
6262
var viewBookmark = content.document.querySelector("a#viewBookmark");
6363
viewBookmark.click();
6464

65-
Assert.greater(
66-
viewBookmark.href.length,
67-
0,
68-
"viewBookmark button has href"
69-
);
65+
Assert.ok(viewBookmark.href.length > 0, "viewBookmark button has href");
7066

7167
var viewer = content.wrappedJSObject.PDFViewerApplication;
7268
await viewer.close();

browser/modules/test/browser/browser_PageActions.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -310,11 +310,7 @@ add_task(async function simple() {
310310
// unregister
311311
PageActions._actionsByID.delete(action.id);
312312
let index = PageActions._nonBuiltInActions.findIndex(a => a.id == action.id);
313-
Assert.greaterEqual(
314-
index,
315-
0,
316-
"Action should be in _nonBuiltInActions to begin with"
317-
);
313+
Assert.ok(index >= 0, "Action should be in _nonBuiltInActions to begin with");
318314
PageActions._nonBuiltInActions.splice(index, 1);
319315

320316
// register again

browser/modules/test/browser/browser_UnsubmittedCrashHandler.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ add_task(async function test_dont_decrement_chances_on_same_day() {
575575
let initChances = UnsubmittedCrashHandler.prefs.getIntPref(
576576
"chancesUntilSuppress"
577577
);
578-
Assert.greater(initChances, 1, "We should start with at least 1 chance.");
578+
Assert.ok(initChances > 1, "We should start with at least 1 chance.");
579579

580580
await createPendingCrashReports(1);
581581
let notification = await UnsubmittedCrashHandler.checkForUnsubmittedCrashReports();
@@ -625,7 +625,7 @@ add_task(async function test_decrement_chances_on_other_day() {
625625
let initChances = UnsubmittedCrashHandler.prefs.getIntPref(
626626
"chancesUntilSuppress"
627627
);
628-
Assert.greater(initChances, 1, "We should start with at least 1 chance.");
628+
Assert.ok(initChances > 1, "We should start with at least 1 chance.");
629629

630630
await createPendingCrashReports(1);
631631
let notification = await UnsubmittedCrashHandler.checkForUnsubmittedCrashReports();

dom/tests/browser/perfmetrics/browser_test_performance_metrics.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -148,14 +148,14 @@ add_task(async function test() {
148148
let results = await ChromeUtils.requestPerformanceMetrics();
149149
exploreResults(results);
150150

151-
Assert.greater(workerDuration, 0, "Worker duration should be positive");
152-
Assert.greater(workerTotal, 0, "Worker count should be positive");
153-
Assert.greater(duration, 0, "Duration should be positive");
154-
Assert.greater(total, 0, "Should get a positive count");
151+
Assert.ok(workerDuration > 0, "Worker duration should be positive");
152+
Assert.ok(workerTotal > 0, "Worker count should be positive");
153+
Assert.ok(duration > 0, "Duration should be positive");
154+
Assert.ok(total > 0, "Should get a positive count");
155155
Assert.ok(parentProcessEvent, "parent process sent back some events");
156156
Assert.ok(isTopLevel, "example.com as a top level window");
157157
Assert.ok(aboutMemoryFound, "about:memory");
158-
Assert.greater(heapUsage, 0, "got some memory value reported");
158+
Assert.ok(heapUsage > 0, "got some memory value reported");
159159
Assert.ok(sharedWorker, "We got some info from a shared worker");
160160
let numCounters = counterIds.length;
161161
Assert.ok(
@@ -185,8 +185,8 @@ add_task(async function test() {
185185
workerTotal > previousWorkerTotal,
186186
"Worker count should be positive"
187187
);
188-
Assert.greater(duration, previousDuration, "Duration should be positive");
189-
Assert.greater(total, previousTotal, "Should get a positive count");
188+
Assert.ok(duration > previousDuration, "Duration should be positive");
189+
Assert.ok(total > previousTotal, "Should get a positive count");
190190

191191
// load a tab with a setInterval, we should get counters on TaskCategory::Timer
192192
await BrowserTestUtils.withNewTab(
@@ -196,7 +196,7 @@ add_task(async function test() {
196196
let previousTimerCalls = timerCalls;
197197
results = await ChromeUtils.requestPerformanceMetrics();
198198
exploreResults(results, tabId);
199-
Assert.greater(timerCalls, previousTimerCalls, "Got timer calls");
199+
Assert.ok(timerCalls > previousTimerCalls, "Got timer calls");
200200
}
201201
);
202202

@@ -208,7 +208,7 @@ add_task(async function test() {
208208
let previousTimerCalls = timerCalls;
209209
results = await ChromeUtils.requestPerformanceMetrics();
210210
exploreResults(results, tabId);
211-
Assert.greater(timerCalls, previousTimerCalls, "Got timer calls");
211+
Assert.ok(timerCalls > previousTimerCalls, "Got timer calls");
212212
}
213213
);
214214

@@ -219,7 +219,7 @@ add_task(async function test() {
219219
let tabId = gBrowser.selectedBrowser.outerWindowID;
220220
results = await ChromeUtils.requestPerformanceMetrics();
221221
exploreResults(results, tabId);
222-
Assert.greater(mediaMemory, 0, "Got some memory used for media");
222+
Assert.ok(mediaMemory > 0, "Got some memory used for media");
223223
}
224224
);
225225
}

0 commit comments

Comments
 (0)