зеркало из https://github.com/mozilla/gecko-dev.git
Merge mozilla-central to inbound. a=merge
This commit is contained in:
Коммит
275db249df
|
@ -1500,59 +1500,43 @@ option('--enable-gold',
|
||||||
|
|
||||||
imply_option('--enable-linker', 'gold', when='--enable-gold')
|
imply_option('--enable-linker', 'gold', when='--enable-gold')
|
||||||
|
|
||||||
|
js_option('--enable-linker', nargs=1,
|
||||||
|
choices=('bfd', 'gold', 'lld', 'other'),
|
||||||
|
help='Select the linker',
|
||||||
|
when=is_linker_option_enabled)
|
||||||
|
|
||||||
|
|
||||||
|
@depends('--enable-linker', c_compiler, developer_options,
|
||||||
|
extra_toolchain_flags, when=is_linker_option_enabled)
|
||||||
|
@checking('for linker', lambda x: x.KIND)
|
||||||
@imports('os')
|
@imports('os')
|
||||||
@imports('shutil')
|
@imports('shutil')
|
||||||
def enable_gnu_linker(enable_gold_option, c_compiler, developer_options, build_env,
|
def select_linker(linker, c_compiler, developer_options, toolchain_flags):
|
||||||
toolchain_flags, linker_name):
|
|
||||||
# Used to check the kind of linker
|
linker = linker[0] if linker else 'other'
|
||||||
|
|
||||||
|
# Check the kind of linker
|
||||||
version_check = ['-Wl,--version']
|
version_check = ['-Wl,--version']
|
||||||
cmd_base = c_compiler.wrapper + [c_compiler.compiler] + c_compiler.flags
|
cmd_base = c_compiler.wrapper + [c_compiler.compiler] + c_compiler.flags
|
||||||
|
# Generate the compiler flag
|
||||||
|
linker_flag = ["-fuse-ld=" + linker] if linker != "other" else []
|
||||||
|
cmd = cmd_base + linker_flag + version_check
|
||||||
if toolchain_flags:
|
if toolchain_flags:
|
||||||
cmd_base += toolchain_flags
|
cmd += toolchain_flags
|
||||||
|
|
||||||
def resolve_gold():
|
if (linker == 'gold' or developer_options) and linker != 'bfd':
|
||||||
# Try to force the usage of gold
|
|
||||||
targetDir = os.path.join(build_env.topobjdir, 'build', 'unix', 'gold')
|
|
||||||
|
|
||||||
gold_detection_arg = '-print-prog-name=ld.gold'
|
|
||||||
detection_cmd = cmd_base + [gold_detection_arg]
|
|
||||||
gold = check_cmd_output(*detection_cmd).strip()
|
|
||||||
if not gold:
|
|
||||||
return
|
|
||||||
|
|
||||||
goldFullPath = find_program(gold)
|
|
||||||
if goldFullPath is None:
|
|
||||||
return
|
|
||||||
|
|
||||||
if os.path.exists(targetDir):
|
|
||||||
shutil.rmtree(targetDir)
|
|
||||||
os.makedirs(targetDir)
|
|
||||||
os.symlink(goldFullPath, os.path.join(targetDir, 'ld'))
|
|
||||||
|
|
||||||
linker = ['-B', targetDir]
|
|
||||||
cmd = cmd_base + linker + version_check
|
|
||||||
if 'GNU gold' in check_cmd_output(*cmd).decode('utf-8'):
|
if 'GNU gold' in check_cmd_output(*cmd).decode('utf-8'):
|
||||||
# We have detected gold, will build with the -B workaround
|
# We have detected gold, will build with -fuse-ld=gold
|
||||||
return namespace(
|
return namespace(
|
||||||
KIND='gold',
|
KIND='gold',
|
||||||
LINKER_FLAG=linker,
|
LINKER_FLAG=linker_flag,
|
||||||
)
|
)
|
||||||
else:
|
|
||||||
# The -B trick didn't work, removing the directory
|
|
||||||
shutil.rmtree(targetDir)
|
|
||||||
|
|
||||||
if (enable_gold_option or developer_options) and linker_name != 'bfd':
|
|
||||||
result = resolve_gold()
|
|
||||||
|
|
||||||
if result:
|
|
||||||
return result
|
|
||||||
# gold is only required if --enable-gold is used.
|
# gold is only required if --enable-gold is used.
|
||||||
elif enable_gold_option:
|
if linker == 'gold':
|
||||||
die('Could not find gold')
|
die('Could not find gold')
|
||||||
# Else fallthrough.
|
# Else fallthrough.
|
||||||
|
|
||||||
cmd = cmd_base + version_check
|
|
||||||
cmd_output = check_cmd_output(*cmd).decode('utf-8')
|
cmd_output = check_cmd_output(*cmd).decode('utf-8')
|
||||||
# using decode because ld can be localized and python will
|
# using decode because ld can be localized and python will
|
||||||
# have problems with french accent for example
|
# have problems with french accent for example
|
||||||
|
@ -1568,41 +1552,22 @@ def enable_gnu_linker(enable_gold_option, c_compiler, developer_options, build_e
|
||||||
KIND='gold'
|
KIND='gold'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if 'LLD' in cmd_output:
|
||||||
|
return namespace(
|
||||||
|
KIND='lld',
|
||||||
|
LINKER_FLAG=linker_flag,
|
||||||
|
)
|
||||||
|
elif linker == 'lld':
|
||||||
|
# We forced the lld linker but could not find the string
|
||||||
|
# when checking, fail the build
|
||||||
|
die("Could not use lld as linker")
|
||||||
|
|
||||||
# For other platforms without gold or the GNU linker
|
# For other platforms without gold or the GNU linker
|
||||||
return namespace(
|
return namespace(
|
||||||
KIND='other'
|
KIND='other'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
js_option('--enable-linker', nargs=1,
|
|
||||||
choices=('bfd', 'gold', 'lld', 'other'),
|
|
||||||
help='Select the linker',
|
|
||||||
when=is_linker_option_enabled)
|
|
||||||
|
|
||||||
|
|
||||||
@depends('--enable-linker', c_compiler, developer_options, check_build_environment,
|
|
||||||
extra_toolchain_flags, when=is_linker_option_enabled)
|
|
||||||
@checking('for linker', lambda x: x.KIND)
|
|
||||||
def select_linker(linker, c_compiler, developer_options, build_env, toolchain_flags):
|
|
||||||
linker = linker[0] if linker else 'other'
|
|
||||||
if linker in ('gold', 'bfd', 'other'):
|
|
||||||
return enable_gnu_linker(linker == 'gold', c_compiler, developer_options,
|
|
||||||
build_env, toolchain_flags, linker)
|
|
||||||
if linker == 'lld':
|
|
||||||
version_check = ['-Wl,--version']
|
|
||||||
cmd_base = c_compiler.wrapper + \
|
|
||||||
[c_compiler.compiler] + c_compiler.flags
|
|
||||||
lld = ["-fuse-ld=" + linker]
|
|
||||||
cmd = cmd_base + lld + version_check
|
|
||||||
if 'LLD' in check_cmd_output(*cmd).decode('utf-8'):
|
|
||||||
return namespace(
|
|
||||||
KIND='lld',
|
|
||||||
LINKER_FLAG=lld,
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
die("Could not use lld as linker")
|
|
||||||
|
|
||||||
|
|
||||||
set_config('LD_IS_BFD', depends(select_linker.KIND)
|
set_config('LD_IS_BFD', depends(select_linker.KIND)
|
||||||
(lambda x: x == 'bfd' or None))
|
(lambda x: x == 'bfd' or None))
|
||||||
set_config('LINKER_LDFLAGS', select_linker.LINKER_FLAG)
|
set_config('LINKER_LDFLAGS', select_linker.LINKER_FLAG)
|
||||||
|
|
|
@ -7,7 +7,8 @@
|
||||||
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
|
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
|
||||||
const { Component } = require("devtools/client/shared/vendor/react");
|
const { Component } = require("devtools/client/shared/vendor/react");
|
||||||
const { a, div, li, ul } = require("devtools/client/shared/vendor/react-dom-factories");
|
const { a, div, li, ul } = require("devtools/client/shared/vendor/react-dom-factories");
|
||||||
const DOC_URL = "https://developer.mozilla.org/docs/Web/API/Service_Worker_API/Using_Service_Workers";
|
const DOC_URL = "https://developer.mozilla.org/docs/Web/API/Service_Worker_API/Using_Service_Workers" +
|
||||||
|
"?utm_source=devtools&utm_medium=sw-panel-blank";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This component displays help information when no service workers are found for the
|
* This component displays help information when no service workers are found for the
|
||||||
|
|
|
@ -71,7 +71,7 @@ When working on make the Network Monitor running in the browser tab, you may nee
|
||||||
* [devtools-launchpad](https://github.com/devtools-html/devtools-core/blob/master/packages/devtools-launchpad/#readme) provide the dev server, landing page and the bootstrap functions to run devtools in the browser tab.
|
* [devtools-launchpad](https://github.com/devtools-html/devtools-core/blob/master/packages/devtools-launchpad/#readme) provide the dev server, landing page and the bootstrap functions to run devtools in the browser tab.
|
||||||
* [devtools-modules](https://github.com/devtools-html/devtools-core/blob/master/packages/devtools-modules/#readme) Devtools shared and shim modules.
|
* [devtools-modules](https://github.com/devtools-html/devtools-core/blob/master/packages/devtools-modules/#readme) Devtools shared and shim modules.
|
||||||
* [devtools-source-editor](https://github.com/devtools-html/devtools-core/blob/master/packages/devtools-source-editor/#readme) Source Editor component.
|
* [devtools-source-editor](https://github.com/devtools-html/devtools-core/blob/master/packages/devtools-source-editor/#readme) Source Editor component.
|
||||||
* [devtools-reps](https://github.com/devtools-html/devtools-core/blob/master/packages/devtools-reps/#readme) remote object formatter for variables representation.
|
* [devtools-reps](https://github.com/devtools-html/debugger.html/blob/master/packages/devtools-reps/#readme) remote object formatter for variables representation.
|
||||||
|
|
||||||
Do `yarn link` modules in related module directory, then do `yarn link [module-name]` after `yarn install` modules.
|
Do `yarn link` modules in related module directory, then do `yarn link [module-name]` after `yarn install` modules.
|
||||||
|
|
||||||
|
|
|
@ -153,6 +153,7 @@ class HeadersPanel extends Component {
|
||||||
member: Object.assign({}, member, { open: false }),
|
member: Object.assign({}, member, { open: false }),
|
||||||
mode: MODE.TINY,
|
mode: MODE.TINY,
|
||||||
cropLimit: 60,
|
cropLimit: 60,
|
||||||
|
noGrip: true,
|
||||||
})),
|
})),
|
||||||
headerDocURL ? MDNLink({
|
headerDocURL ? MDNLink({
|
||||||
url: headerDocURL,
|
url: headerDocURL,
|
||||||
|
|
|
@ -162,6 +162,7 @@ class PropertiesView extends Component {
|
||||||
member: Object.assign({}, member, { open: false }),
|
member: Object.assign({}, member, { open: false }),
|
||||||
mode: MODE.TINY,
|
mode: MODE.TINY,
|
||||||
cropLimit: this.props.cropLimit,
|
cropLimit: this.props.cropLimit,
|
||||||
|
noGrip: true,
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -134,6 +134,7 @@ skip-if = (os == 'linux' && debug && bits == 32) # Bug 1303439
|
||||||
[browser_net_json-null.js]
|
[browser_net_json-null.js]
|
||||||
[browser_net_json-long.js]
|
[browser_net_json-long.js]
|
||||||
[browser_net_json-malformed.js]
|
[browser_net_json-malformed.js]
|
||||||
|
[browser_net_json-nogrip.js]
|
||||||
[browser_net_json_custom_mime.js]
|
[browser_net_json_custom_mime.js]
|
||||||
[browser_net_json_text_mime.js]
|
[browser_net_json_text_mime.js]
|
||||||
[browser_net_jsonp.js]
|
[browser_net_jsonp.js]
|
||||||
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
/* Any copyright is dedicated to the Public Domain.
|
||||||
|
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tests if JSON responses with property 'type' are correctly rendered.
|
||||||
|
* (Reps rendering JSON responses should use `noGrip=true`).
|
||||||
|
*/
|
||||||
|
add_task(async function() {
|
||||||
|
let { tab, monitor } = await initNetMonitor(JSON_BASIC_URL + "?name=nogrip");
|
||||||
|
info("Starting test... ");
|
||||||
|
|
||||||
|
let { document, store, windowRequire } = monitor.panelWin;
|
||||||
|
let Actions = windowRequire("devtools/client/netmonitor/src/actions/index");
|
||||||
|
|
||||||
|
store.dispatch(Actions.batchEnable(false));
|
||||||
|
|
||||||
|
await performRequests(monitor, tab, 1);
|
||||||
|
|
||||||
|
let onResponsePanelReady = waitForDOM(document, "#response-panel .CodeMirror-code");
|
||||||
|
store.dispatch(Actions.toggleNetworkDetails());
|
||||||
|
EventUtils.sendMouseEvent({ type: "click" },
|
||||||
|
document.querySelector("#response-tab"));
|
||||||
|
await onResponsePanelReady;
|
||||||
|
|
||||||
|
let tabpanel = document.querySelector("#response-panel");
|
||||||
|
let labels = tabpanel
|
||||||
|
.querySelectorAll("tr:not(.tree-section) .treeLabelCell .treeLabel");
|
||||||
|
let values = tabpanel
|
||||||
|
.querySelectorAll("tr:not(.tree-section) .treeValueCell .objectBox");
|
||||||
|
|
||||||
|
// Verify that an object is rendered: `obj: {…}`
|
||||||
|
is(labels[0].textContent, "obj", "The first json property name is correct.");
|
||||||
|
is(values[0].textContent, "{\u2026}", "The first json property value is correct.");
|
||||||
|
|
||||||
|
await teardown(monitor);
|
||||||
|
});
|
|
@ -18,5 +18,8 @@ function handleRequest(request, response) {
|
||||||
case "null":
|
case "null":
|
||||||
response.write("{ \"greeting\": null }");
|
response.write("{ \"greeting\": null }");
|
||||||
break;
|
break;
|
||||||
|
case "nogrip":
|
||||||
|
response.write("{\"obj\": {\"type\": \"string\" }}");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
Reps are now maintained on GitHub at: https://github.com/devtools-html/devtools-core/tree/master/packages/devtools-reps
|
Reps are now maintained on GitHub at: https://github.com/devtools-html/debugger.html/tree/master/packages/devtools-reps
|
||||||
|
|
||||||
All the files in this folder are copied from the devtools-core github repository and
|
All the files in this folder are copied from the debugger.html github repository and
|
||||||
should not be modified here.
|
should not be modified here.
|
||||||
|
|
||||||
For any issue or feature request on Reps, please log an issue at
|
For any issue or feature request on Reps, please log an issue at
|
||||||
https://github.com/devtools-html/devtools-core/issues with the label "Reps".
|
https://github.com/devtools-html/debugger.html/issues with the label "devtools-reps".
|
||||||
|
|
|
@ -28,6 +28,11 @@ class Draggable extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
startDragging(ev) {
|
startDragging(ev) {
|
||||||
|
if (this.isDragging) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.isDragging = true;
|
||||||
|
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
const doc = ReactDOM.findDOMNode(this).ownerDocument;
|
const doc = ReactDOM.findDOMNode(this).ownerDocument;
|
||||||
doc.addEventListener("mousemove", this.onMove);
|
doc.addEventListener("mousemove", this.onMove);
|
||||||
|
@ -36,6 +41,10 @@ class Draggable extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
onMove(ev) {
|
onMove(ev) {
|
||||||
|
if (!this.isDragging) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
// Use viewport coordinates so, moving mouse over iframes
|
// Use viewport coordinates so, moving mouse over iframes
|
||||||
// doesn't mangle (relative) coordinates.
|
// doesn't mangle (relative) coordinates.
|
||||||
|
@ -43,6 +52,11 @@ class Draggable extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
onUp(ev) {
|
onUp(ev) {
|
||||||
|
if (!this.isDragging) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.isDragging = false;
|
||||||
|
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
const doc = ReactDOM.findDOMNode(this).ownerDocument;
|
const doc = ReactDOM.findDOMNode(this).ownerDocument;
|
||||||
doc.removeEventListener("mousemove", this.onMove);
|
doc.removeEventListener("mousemove", this.onMove);
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
devtools-source-map is maintained on GitHub at:
|
devtools-source-map is maintained on GitHub at:
|
||||||
|
|
||||||
https://github.com/devtools-html/devtools-core/tree/master/packages/devtools-source-map
|
https://github.com/devtools-html/debugger.html/tree/master/packages/devtools-source-map
|
||||||
|
|
||||||
All the files in this folder are copied from the above repository and
|
All the files in this folder are copied from the above repository and
|
||||||
should not be modified here.
|
should not be modified here.
|
||||||
|
|
||||||
For any issue or feature request on devtools-source-map, please log an issue at:
|
For any issue or feature request on devtools-source-map, please log an issue at:
|
||||||
|
|
||||||
https://github.com/devtools-html/devtools-core/issues
|
https://github.com/devtools-html/debugger.html/issues
|
||||||
|
|
||||||
and label it with "source-map".
|
and label it with "devtools-source-map".
|
|
@ -73,7 +73,7 @@ Besides the third party modules, here are modules required for the WebConsole
|
||||||
* [devtools-launchpad](https://github.com/devtools-html/devtools-core/blob/master/packages/devtools-launchpad/#readme) provide the dev server, landing page and the bootstrap functions to run devtools in the browser tab.
|
* [devtools-launchpad](https://github.com/devtools-html/devtools-core/blob/master/packages/devtools-launchpad/#readme) provide the dev server, landing page and the bootstrap functions to run devtools in the browser tab.
|
||||||
* [devtools-modules](https://github.com/devtools-html/devtools-core/blob/master/packages/devtools-modules/#readme) Devtools shared and shim modules.
|
* [devtools-modules](https://github.com/devtools-html/devtools-core/blob/master/packages/devtools-modules/#readme) Devtools shared and shim modules.
|
||||||
* [devtools-source-editor](https://github.com/devtools-html/devtools-core/blob/master/packages/devtools-source-editor/#readme) Source Editor component.
|
* [devtools-source-editor](https://github.com/devtools-html/devtools-core/blob/master/packages/devtools-source-editor/#readme) Source Editor component.
|
||||||
* [devtools-reps](https://github.com/devtools-html/devtools-core/blob/master/packages/devtools-reps/#readme) remote object formatter for variables representation.
|
* [devtools-reps](https://github.com/devtools-html/debugger.html/blob/master/packages/devtools-reps/#readme) remote object formatter for variables representation.
|
||||||
|
|
||||||
Changes to those modules need to be done on Github, using the Pull Request workflow.
|
Changes to those modules need to be done on Github, using the Pull Request workflow.
|
||||||
Then, a new version of the modified package need to be released on npm so the version number
|
Then, a new version of the modified package need to be released on npm so the version number
|
||||||
|
|
|
@ -653,6 +653,7 @@ EventStateManager::PreHandleEvent(nsPresContext* aPresContext,
|
||||||
if (Prefs::ClickHoldContextMenu()) {
|
if (Prefs::ClickHoldContextMenu()) {
|
||||||
KillClickHoldTimer();
|
KillClickHoldTimer();
|
||||||
}
|
}
|
||||||
|
mInTouchDrag = false;
|
||||||
StopTrackingDragGesture();
|
StopTrackingDragGesture();
|
||||||
sNormalLMouseEventInProcess = false;
|
sNormalLMouseEventInProcess = false;
|
||||||
// then fall through...
|
// then fall through...
|
||||||
|
|
|
@ -305,6 +305,8 @@ HTMLEditor::ShowGrabber(Element& aElement)
|
||||||
mGrabber = CreateGrabber(*parentContent);
|
mGrabber = CreateGrabber(*parentContent);
|
||||||
NS_ENSURE_TRUE(mGrabber, NS_ERROR_FAILURE);
|
NS_ENSURE_TRUE(mGrabber, NS_ERROR_FAILURE);
|
||||||
|
|
||||||
|
mHasShownGrabber = true;
|
||||||
|
|
||||||
// and set its position
|
// and set its position
|
||||||
return RefreshGrabber();
|
return RefreshGrabber();
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
#include "mozilla/EditorDOMPoint.h"
|
#include "mozilla/EditorDOMPoint.h"
|
||||||
#include "mozilla/EventStates.h"
|
#include "mozilla/EventStates.h"
|
||||||
#include "mozilla/mozInlineSpellChecker.h"
|
#include "mozilla/mozInlineSpellChecker.h"
|
||||||
|
#include "mozilla/Telemetry.h"
|
||||||
#include "mozilla/TextEvents.h"
|
#include "mozilla/TextEvents.h"
|
||||||
|
|
||||||
#include "nsCRT.h"
|
#include "nsCRT.h"
|
||||||
|
@ -103,15 +104,18 @@ HTMLEditor::HTMLEditor()
|
||||||
: mCRInParagraphCreatesParagraph(false)
|
: mCRInParagraphCreatesParagraph(false)
|
||||||
, mCSSAware(false)
|
, mCSSAware(false)
|
||||||
, mSelectedCellIndex(0)
|
, mSelectedCellIndex(0)
|
||||||
|
, mHasShownResizers(false)
|
||||||
, mIsObjectResizingEnabled(true)
|
, mIsObjectResizingEnabled(true)
|
||||||
, mIsResizing(false)
|
, mIsResizing(false)
|
||||||
, mPreserveRatio(false)
|
, mPreserveRatio(false)
|
||||||
, mResizedObjectIsAnImage(false)
|
, mResizedObjectIsAnImage(false)
|
||||||
, mIsAbsolutelyPositioningEnabled(true)
|
, mIsAbsolutelyPositioningEnabled(true)
|
||||||
, mResizedObjectIsAbsolutelyPositioned(false)
|
, mResizedObjectIsAbsolutelyPositioned(false)
|
||||||
|
, mHasShownGrabber(false)
|
||||||
, mGrabberClicked(false)
|
, mGrabberClicked(false)
|
||||||
, mIsMoving(false)
|
, mIsMoving(false)
|
||||||
, mSnapToGridEnabled(false)
|
, mSnapToGridEnabled(false)
|
||||||
|
, mHasShownInlineTableEditor(false)
|
||||||
, mIsInlineTableEditingEnabled(true)
|
, mIsInlineTableEditingEnabled(true)
|
||||||
, mOriginalX(0)
|
, mOriginalX(0)
|
||||||
, mOriginalY(0)
|
, mOriginalY(0)
|
||||||
|
@ -127,6 +131,9 @@ HTMLEditor::HTMLEditor()
|
||||||
, mYIncrementFactor(0)
|
, mYIncrementFactor(0)
|
||||||
, mWidthIncrementFactor(0)
|
, mWidthIncrementFactor(0)
|
||||||
, mHeightIncrementFactor(0)
|
, mHeightIncrementFactor(0)
|
||||||
|
, mResizerUsedCount(0)
|
||||||
|
, mGrabberUsedCount(0)
|
||||||
|
, mInlineTableEditorUsedCount(0)
|
||||||
, mInfoXIncrement(20)
|
, mInfoXIncrement(20)
|
||||||
, mInfoYIncrement(20)
|
, mInfoYIncrement(20)
|
||||||
, mPositionedObjectX(0)
|
, mPositionedObjectX(0)
|
||||||
|
@ -164,6 +171,31 @@ HTMLEditor::~HTMLEditor()
|
||||||
RemoveEventListeners();
|
RemoveEventListeners();
|
||||||
|
|
||||||
HideAnonymousEditingUIs();
|
HideAnonymousEditingUIs();
|
||||||
|
|
||||||
|
Telemetry::Accumulate(
|
||||||
|
Telemetry::HTMLEDITORS_WITH_RESIZERS,
|
||||||
|
mHasShownResizers ? 1 : 0);
|
||||||
|
if (mHasShownResizers) {
|
||||||
|
Telemetry::Accumulate(
|
||||||
|
Telemetry::HTMLEDITORS_WHOSE_RESIZERS_USED_BY_USER,
|
||||||
|
mResizerUsedCount);
|
||||||
|
}
|
||||||
|
Telemetry::Accumulate(
|
||||||
|
Telemetry::HTMLEDITORS_WITH_ABSOLUTE_POSITIONER,
|
||||||
|
mHasShownGrabber ? 1 : 0);
|
||||||
|
if (mHasShownGrabber) {
|
||||||
|
Telemetry::Accumulate(
|
||||||
|
Telemetry::HTMLEDITORS_WHOSE_ABSOLUTE_POSITIONER_USED_BY_USER,
|
||||||
|
mGrabberUsedCount);
|
||||||
|
}
|
||||||
|
Telemetry::Accumulate(
|
||||||
|
Telemetry::HTMLEDITORS_WITH_INLINE_TABLE_EDITOR,
|
||||||
|
mHasShownInlineTableEditor ? 1 : 0);
|
||||||
|
if (mHasShownInlineTableEditor) {
|
||||||
|
Telemetry::Accumulate(
|
||||||
|
Telemetry::HTMLEDITORS_WHOSE_INLINE_TABLE_EDITOR_USED_BY_USER,
|
||||||
|
mInlineTableEditorUsedCount);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -1282,6 +1282,9 @@ protected:
|
||||||
void UpdateRootElement();
|
void UpdateRootElement();
|
||||||
|
|
||||||
// resizing
|
// resizing
|
||||||
|
// If the instance has shown resizers at least once, mHasShownResizers is
|
||||||
|
// set to true.
|
||||||
|
bool mHasShownResizers;
|
||||||
bool mIsObjectResizingEnabled;
|
bool mIsObjectResizingEnabled;
|
||||||
bool mIsResizing;
|
bool mIsResizing;
|
||||||
bool mPreserveRatio;
|
bool mPreserveRatio;
|
||||||
|
@ -1290,13 +1293,18 @@ protected:
|
||||||
// absolute positioning
|
// absolute positioning
|
||||||
bool mIsAbsolutelyPositioningEnabled;
|
bool mIsAbsolutelyPositioningEnabled;
|
||||||
bool mResizedObjectIsAbsolutelyPositioned;
|
bool mResizedObjectIsAbsolutelyPositioned;
|
||||||
|
// If the instance has shown grabber at least once, mHasShownGrabber is
|
||||||
|
// set to true.
|
||||||
|
bool mHasShownGrabber;
|
||||||
bool mGrabberClicked;
|
bool mGrabberClicked;
|
||||||
bool mIsMoving;
|
bool mIsMoving;
|
||||||
|
|
||||||
bool mSnapToGridEnabled;
|
bool mSnapToGridEnabled;
|
||||||
|
|
||||||
// inline table editing
|
// inline table editing
|
||||||
|
// If the instance has shown inline table editor at least once,
|
||||||
|
// mHasShownInlineTableEditor is set to true.
|
||||||
|
bool mHasShownInlineTableEditor;
|
||||||
bool mIsInlineTableEditingEnabled;
|
bool mIsInlineTableEditingEnabled;
|
||||||
|
|
||||||
// resizing
|
// resizing
|
||||||
|
@ -1337,6 +1345,12 @@ protected:
|
||||||
int32_t mWidthIncrementFactor;
|
int32_t mWidthIncrementFactor;
|
||||||
int32_t mHeightIncrementFactor;
|
int32_t mHeightIncrementFactor;
|
||||||
|
|
||||||
|
// When resizers, grabber and/or inline table editor are operated by user
|
||||||
|
// actually, the following counters are increased.
|
||||||
|
uint32_t mResizerUsedCount;
|
||||||
|
uint32_t mGrabberUsedCount;
|
||||||
|
uint32_t mInlineTableEditorUsedCount;
|
||||||
|
|
||||||
int8_t mInfoXIncrement;
|
int8_t mInfoXIncrement;
|
||||||
int8_t mInfoYIncrement;
|
int8_t mInfoYIncrement;
|
||||||
|
|
||||||
|
|
|
@ -350,6 +350,8 @@ HTMLEditor::ShowResizersInner(Element& aResizedElement)
|
||||||
|
|
||||||
MOZ_ASSERT(mResizedObject == &aResizedElement);
|
MOZ_ASSERT(mResizedObject == &aResizedElement);
|
||||||
|
|
||||||
|
mHasShownResizers = true;
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -525,7 +527,7 @@ HTMLEditor::OnMouseDown(int32_t aClientX,
|
||||||
// If we have an anonymous element and that element is a resizer,
|
// If we have an anonymous element and that element is a resizer,
|
||||||
// let's start resizing!
|
// let's start resizing!
|
||||||
aEvent->PreventDefault();
|
aEvent->PreventDefault();
|
||||||
|
mResizerUsedCount++;
|
||||||
mOriginalX = aClientX;
|
mOriginalX = aClientX;
|
||||||
mOriginalY = aClientY;
|
mOriginalY = aClientY;
|
||||||
return StartResizing(aTarget);
|
return StartResizing(aTarget);
|
||||||
|
@ -534,6 +536,7 @@ HTMLEditor::OnMouseDown(int32_t aClientX,
|
||||||
if (anonclass.EqualsLiteral("mozGrabber")) {
|
if (anonclass.EqualsLiteral("mozGrabber")) {
|
||||||
// If we have an anonymous element and that element is a grabber,
|
// If we have an anonymous element and that element is a grabber,
|
||||||
// let's start moving the element!
|
// let's start moving the element!
|
||||||
|
mGrabberUsedCount++;
|
||||||
mOriginalX = aClientX;
|
mOriginalX = aClientX;
|
||||||
mOriginalY = aClientY;
|
mOriginalY = aClientY;
|
||||||
return GrabberClicked();
|
return GrabberClicked();
|
||||||
|
|
|
@ -88,6 +88,9 @@ HTMLEditor::ShowInlineTableEditingUI(Element* aCell)
|
||||||
AddMouseClickListener(mAddRowAfterButton);
|
AddMouseClickListener(mAddRowAfterButton);
|
||||||
|
|
||||||
mInlineEditedCell = aCell;
|
mInlineEditedCell = aCell;
|
||||||
|
|
||||||
|
mHasShownInlineTableEditor = true;
|
||||||
|
|
||||||
return RefreshInlineTableEditingUI();
|
return RefreshInlineTableEditingUI();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -159,6 +162,8 @@ HTMLEditor::DoInlineTableEditingAction(const Element& aElement)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
++mInlineTableEditorUsedCount;
|
||||||
|
|
||||||
// InsertTableRow might causes reframe
|
// InsertTableRow might causes reframe
|
||||||
if (Destroyed()) {
|
if (Destroyed()) {
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
|
@ -2175,6 +2175,9 @@ pref("network.cookie.lifetime.days", 90); // Ignored unless network.cooki
|
||||||
// Set to 0 to disable moving the cookies.
|
// Set to 0 to disable moving the cookies.
|
||||||
pref("network.cookie.move.interval_sec", 10);
|
pref("network.cookie.move.interval_sec", 10);
|
||||||
|
|
||||||
|
pref("network.cookie.maxNumber", 3000);
|
||||||
|
pref("network.cookie.maxPerHost", 180);
|
||||||
|
|
||||||
// The PAC file to load. Ignored unless network.proxy.type is 2.
|
// The PAC file to load. Ignored unless network.proxy.type is 2.
|
||||||
pref("network.proxy.autoconfig_url", "");
|
pref("network.proxy.autoconfig_url", "");
|
||||||
// Strip off paths when sending URLs to PAC scripts
|
// Strip off paths when sending URLs to PAC scripts
|
||||||
|
|
|
@ -115,7 +115,7 @@ static const int64_t kCookiePurgeAge =
|
||||||
// default limits for the cookie list. these can be tuned by the
|
// default limits for the cookie list. these can be tuned by the
|
||||||
// network.cookie.maxNumber and network.cookie.maxPerHost prefs respectively.
|
// network.cookie.maxNumber and network.cookie.maxPerHost prefs respectively.
|
||||||
static const uint32_t kMaxNumberOfCookies = 3000;
|
static const uint32_t kMaxNumberOfCookies = 3000;
|
||||||
static const uint32_t kMaxCookiesPerHost = 150;
|
static const uint32_t kMaxCookiesPerHost = 180;
|
||||||
static const uint32_t kMaxBytesPerCookie = 4096;
|
static const uint32_t kMaxBytesPerCookie = 4096;
|
||||||
static const uint32_t kMaxBytesPerPath = 1024;
|
static const uint32_t kMaxBytesPerPath = 1024;
|
||||||
|
|
||||||
|
|
|
@ -659,6 +659,7 @@ class TupBackend(CommonBackend):
|
||||||
inputs=full_inputs,
|
inputs=full_inputs,
|
||||||
outputs=outputs,
|
outputs=outputs,
|
||||||
extra_outputs=extra_outputs,
|
extra_outputs=extra_outputs,
|
||||||
|
check_unchanged=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
def _process_defines(self, backend_file, obj, host=False):
|
def _process_defines(self, backend_file, obj, host=False):
|
||||||
|
@ -819,6 +820,7 @@ class TupBackend(CommonBackend):
|
||||||
cmd=cmd,
|
cmd=cmd,
|
||||||
outputs=outputs,
|
outputs=outputs,
|
||||||
extra_outputs=[self._installed_files],
|
extra_outputs=[self._installed_files],
|
||||||
|
check_unchanged=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
cpp_backend_file = self._get_backend_file('xpcom/reflect/xptinfo')
|
cpp_backend_file = self._get_backend_file('xpcom/reflect/xptinfo')
|
||||||
|
@ -834,6 +836,7 @@ class TupBackend(CommonBackend):
|
||||||
'%f',
|
'%f',
|
||||||
],
|
],
|
||||||
outputs=['xptdata.cpp'],
|
outputs=['xptdata.cpp'],
|
||||||
|
check_unchanged=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
def _preprocess(self, backend_file, input_file, destdir=None, target=None):
|
def _preprocess(self, backend_file, input_file, destdir=None, target=None):
|
||||||
|
@ -858,6 +861,7 @@ class TupBackend(CommonBackend):
|
||||||
display='Preprocess %o',
|
display='Preprocess %o',
|
||||||
cmd=cmd,
|
cmd=cmd,
|
||||||
outputs=[output],
|
outputs=[output],
|
||||||
|
check_unchanged=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
def _handle_ipdl_sources(self, ipdl_dir, sorted_ipdl_sources, sorted_nonstatic_ipdl_sources,
|
def _handle_ipdl_sources(self, ipdl_dir, sorted_ipdl_sources, sorted_nonstatic_ipdl_sources,
|
||||||
|
|
|
@ -397258,9 +397258,7 @@
|
||||||
"webdriver/tests/execute_script/json_serialize_windowproxy.py": [
|
"webdriver/tests/execute_script/json_serialize_windowproxy.py": [
|
||||||
[
|
[
|
||||||
"/webdriver/tests/execute_script/json_serialize_windowproxy.py",
|
"/webdriver/tests/execute_script/json_serialize_windowproxy.py",
|
||||||
{
|
{}
|
||||||
"timeout": "long"
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"webdriver/tests/execute_script/user_prompts.py": [
|
"webdriver/tests/execute_script/user_prompts.py": [
|
||||||
|
@ -611509,7 +611507,7 @@
|
||||||
"wdspec"
|
"wdspec"
|
||||||
],
|
],
|
||||||
"webdriver/tests/close_window/user_prompts.py": [
|
"webdriver/tests/close_window/user_prompts.py": [
|
||||||
"59647d3670644c730485cd918f764b9db016e6b7",
|
"7b1255736f8772f5790b9bf1e46cbf1c5b1c2dee",
|
||||||
"wdspec"
|
"wdspec"
|
||||||
],
|
],
|
||||||
"webdriver/tests/conftest.py": [
|
"webdriver/tests/conftest.py": [
|
||||||
|
@ -611549,7 +611547,7 @@
|
||||||
"support"
|
"support"
|
||||||
],
|
],
|
||||||
"webdriver/tests/element_click/bubbling.py": [
|
"webdriver/tests/element_click/bubbling.py": [
|
||||||
"46fb2d0359f5f90eec4cc1f06d2591b5fd2fdf78",
|
"492e283b686abe0743d72e31017be149726628f9",
|
||||||
"wdspec"
|
"wdspec"
|
||||||
],
|
],
|
||||||
"webdriver/tests/element_click/select.py": [
|
"webdriver/tests/element_click/select.py": [
|
||||||
|
@ -611557,7 +611555,7 @@
|
||||||
"wdspec"
|
"wdspec"
|
||||||
],
|
],
|
||||||
"webdriver/tests/element_click/stale.py": [
|
"webdriver/tests/element_click/stale.py": [
|
||||||
"b9f503108f99d4a87784590b69bb2ad6a23c4ac8",
|
"490b6c17365c5eab24fd4a7ac07be6614a86a934",
|
||||||
"wdspec"
|
"wdspec"
|
||||||
],
|
],
|
||||||
"webdriver/tests/element_send_keys/__init__.py": [
|
"webdriver/tests/element_send_keys/__init__.py": [
|
||||||
|
@ -611573,11 +611571,11 @@
|
||||||
"wdspec"
|
"wdspec"
|
||||||
],
|
],
|
||||||
"webdriver/tests/element_send_keys/interactability.py": [
|
"webdriver/tests/element_send_keys/interactability.py": [
|
||||||
"485bd25ba5e1d8c8a646675d0738f278291c7c70",
|
"5374827c90845ded660d540d23bb7e07ac84e445",
|
||||||
"wdspec"
|
"wdspec"
|
||||||
],
|
],
|
||||||
"webdriver/tests/element_send_keys/scroll_into_view.py": [
|
"webdriver/tests/element_send_keys/scroll_into_view.py": [
|
||||||
"b58404e8bb2c8b0cc75300ed1880cfeeb052a364",
|
"e4a50a53a13c1ab76c6c002bbda1c103f8c32ccf",
|
||||||
"wdspec"
|
"wdspec"
|
||||||
],
|
],
|
||||||
"webdriver/tests/execute_async_script/__init__.py": [
|
"webdriver/tests/execute_async_script/__init__.py": [
|
||||||
|
@ -611605,7 +611603,7 @@
|
||||||
"wdspec"
|
"wdspec"
|
||||||
],
|
],
|
||||||
"webdriver/tests/execute_script/json_serialize_windowproxy.py": [
|
"webdriver/tests/execute_script/json_serialize_windowproxy.py": [
|
||||||
"00e735d58b77e9fac207c5ea29e0e70ff43ffd14",
|
"20db10d82ed2b28a22674fcdc37cac0323d33c95",
|
||||||
"wdspec"
|
"wdspec"
|
||||||
],
|
],
|
||||||
"webdriver/tests/execute_script/user_prompts.py": [
|
"webdriver/tests/execute_script/user_prompts.py": [
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
[get.py]
|
|
||||||
disabled:
|
|
||||||
if os == "linux": https://bugzilla.mozilla.org/show_bug.cgi?id=1429391
|
|
|
@ -441,9 +441,10 @@ var History = Object.freeze({
|
||||||
* @param filter: An object containing a non empty subset of the following
|
* @param filter: An object containing a non empty subset of the following
|
||||||
* properties:
|
* properties:
|
||||||
* - host: (string)
|
* - host: (string)
|
||||||
* Hostname with subhost wildcard (at most one *), or empty for local files.
|
* Hostname with or without subhost. Examples:
|
||||||
* The * can be used only if it is the first character in the url, and not the host.
|
* "mozilla.org" removes pages from mozilla.org but not its subdomains
|
||||||
* For example, *.mozilla.org is allowed, *.org, www.*.org or * is not allowed.
|
* ".mozilla.org" removes pages from mozilla.org and its subdomains
|
||||||
|
* "." removes local files
|
||||||
* - beginDate: (Date)
|
* - beginDate: (Date)
|
||||||
* The first time the page was visited (inclusive)
|
* The first time the page was visited (inclusive)
|
||||||
* - endDate: (Date)
|
* - endDate: (Date)
|
||||||
|
@ -467,12 +468,21 @@ var History = Object.freeze({
|
||||||
throw new TypeError("Expected a filter object");
|
throw new TypeError("Expected a filter object");
|
||||||
}
|
}
|
||||||
|
|
||||||
let hasHost = "host" in filter;
|
let hasHost = filter.host;
|
||||||
if (hasHost) {
|
if (hasHost) {
|
||||||
if (typeof filter.host !== "string") {
|
if (typeof filter.host !== "string") {
|
||||||
throw new TypeError("`host` should be a string");
|
throw new TypeError("`host` should be a string");
|
||||||
}
|
}
|
||||||
filter.host = filter.host.toLowerCase();
|
filter.host = filter.host.toLowerCase();
|
||||||
|
if (filter.host.length > 1 && filter.host.lastIndexOf(".") == 0) {
|
||||||
|
// The input contains only an initial period, thus it may be a
|
||||||
|
// wildcarded local host, like ".localhost". Ideally the consumer should
|
||||||
|
// pass just "localhost", because there is no concept of subhosts for
|
||||||
|
// it, but we are being more lenient to allow for simpler input.
|
||||||
|
// Anyway, in this case we remove the wildcard to avoid clearing too
|
||||||
|
// much if the consumer wrongly passes in things like ".com".
|
||||||
|
filter.host = filter.host.slice(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let hasBeginDate = "beginDate" in filter;
|
let hasBeginDate = "beginDate" in filter;
|
||||||
|
@ -493,14 +503,11 @@ var History = Object.freeze({
|
||||||
throw new TypeError("Expected a non-empty filter");
|
throw new TypeError("Expected a non-empty filter");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Host should follow one of these formats
|
// Check the host format.
|
||||||
// The first one matches `localhost` or any other custom set in hostsfile
|
// Either it has no dots, or has multiple dots, or it's a single dot char.
|
||||||
// The second one matches *.mozilla.org or mozilla.com etc
|
|
||||||
// The third one is for local files
|
|
||||||
if (hasHost &&
|
if (hasHost &&
|
||||||
!((/^[a-z0-9-]+$/).test(filter.host)) &&
|
(!/^(\.?([.a-z0-9-]+\.[a-z0-9-]+)?|[a-z0-9-]+)$/.test(filter.host) ||
|
||||||
!((/^(\*\.)?([a-z0-9-]+)(\.[a-z0-9-]+)+$/).test(filter.host)) &&
|
filter.host.includes(".."))) {
|
||||||
(filter.host !== "")) {
|
|
||||||
throw new TypeError("Expected well formed hostname string for `host` with atmost 1 wildcard.");
|
throw new TypeError("Expected well formed hostname string for `host` with atmost 1 wildcard.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1145,24 +1152,24 @@ var removeByFilter = async function(db, filter, onResult = null) {
|
||||||
|
|
||||||
// 2. Create fragment for host and subhost filtering
|
// 2. Create fragment for host and subhost filtering
|
||||||
let hostFilterSQLFragment = "";
|
let hostFilterSQLFragment = "";
|
||||||
if (filter.host || filter.host === "") {
|
if (filter.host) {
|
||||||
// There are four cases that we need to consider,
|
// There are four cases that we need to consider:
|
||||||
// mozilla.org, *.mozilla.org, localhost, and local files
|
// mozilla.org, .mozilla.org, localhost, and local files
|
||||||
|
let revHost = filter.host.split("").reverse().join("");
|
||||||
if (filter.host.indexOf("*") === 0) {
|
if (filter.host == ".") {
|
||||||
// Case 1: subhost wildcard is specified (*.mozilla.org)
|
// Local files.
|
||||||
let revHost = filter.host.slice(2).split("").reverse().join("");
|
hostFilterSQLFragment = `h.rev_host = :revHost`;
|
||||||
|
} else if (filter.host.startsWith(".")) {
|
||||||
|
// Remove the subhost wildcard.
|
||||||
|
revHost = revHost.slice(0, -1);
|
||||||
hostFilterSQLFragment =
|
hostFilterSQLFragment =
|
||||||
`h.rev_host between :revHostStart and :revHostEnd`;
|
`h.rev_host between :revHost || "." and :revHost || "/"`;
|
||||||
params.revHostStart = revHost + ".";
|
|
||||||
params.revHostEnd = revHost + "/";
|
|
||||||
} else {
|
} else {
|
||||||
// This covers the rest (mozilla.org, localhost and local files)
|
// This covers non-wildcarded hosts (e.g.: mozilla.org, localhost)
|
||||||
let revHost = filter.host.split("").reverse().join("") + ".";
|
|
||||||
hostFilterSQLFragment =
|
hostFilterSQLFragment =
|
||||||
`h.rev_host = :hostName`;
|
`h.rev_host = :revHost || "."`;
|
||||||
params.hostName = revHost;
|
|
||||||
}
|
}
|
||||||
|
params.revHost = revHost;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 3. Find out what needs to be removed
|
// 3. Find out what needs to be removed
|
||||||
|
|
|
@ -1,22 +1,23 @@
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
/* This test will ideally test the following cases
|
/*
|
||||||
(each with and without a callback associated with it)
|
This test will ideally test the following cases
|
||||||
* Case A: Tests which should remove pages (Positives)
|
(each with and without a callback associated with it)
|
||||||
* Case A 1: Page has multiple visits both in/out of timeframe, all get deleted
|
Case A: Tests which should remove pages (Positives)
|
||||||
* Case A 2: Page has single uri, removed by host
|
Case A 1: Page has multiple visits both in/out of timeframe, all get deleted
|
||||||
* Case A 3: Page has random subhost, with same host, removed by wildcard
|
Case A 2: Page has single uri, removed by host
|
||||||
* Case A 4: Page is localhost and localhost:port, removed by host
|
Case A 3: Page has random subhost, with same host, removed by wildcard
|
||||||
* Case A 5: Page is a `file://` type address, removed by empty host
|
Case A 4: Page is localhost and localhost:port, removed by host
|
||||||
* Cases A 1,2,3 will be tried with and without bookmarks added (which prevent page deletion)
|
Case A 5: Page is a `file://` type address, removed by empty host
|
||||||
* Case B: Tests in which no pages are removed (Inverses)
|
Cases A 1,2,3 will be tried with and without bookmarks added (which prevent page deletion)
|
||||||
* Case B 1 (inverse): Page has no visits in timeframe, and nothing is deleted
|
Case B: Tests in which no pages are removed (Inverses)
|
||||||
* Case B 2: Page has single uri, not removed since hostname is different
|
Case B 1 (inverse): Page has no visits in timeframe, and nothing is deleted
|
||||||
* Case B 3: Page has multiple subhosts, not removed since wildcard doesn't match
|
Case B 2: Page has single uri, not removed since hostname is different
|
||||||
* Case C: Combinations tests
|
Case B 3: Page has multiple subhosts, not removed since wildcard doesn't match
|
||||||
* Case C 1: Single hostname, multiple visits, at least one in timeframe and hostname
|
Case C: Combinations tests
|
||||||
* Case C 2: Random subhosts, multiple visits, at least one in timeframe and hostname-wildcard
|
Case C 1: Single hostname, multiple visits, at least one in timeframe and hostname
|
||||||
*/
|
Case C 2: Random subhosts, multiple visits, at least one in timeframe and hostname-wildcard
|
||||||
|
*/
|
||||||
|
|
||||||
add_task(async function test_removeByFilter() {
|
add_task(async function test_removeByFilter() {
|
||||||
// Cleanup
|
// Cleanup
|
||||||
|
@ -155,7 +156,7 @@ add_task(async function test_removeByFilter() {
|
||||||
() => checkClosure(remoteUriList[0]),
|
() => checkClosure(remoteUriList[0]),
|
||||||
callbackUse, bookmarkedUri(remoteUriList));
|
callbackUse, bookmarkedUri(remoteUriList));
|
||||||
// Case A 3: Multiple subhost
|
// Case A 3: Multiple subhost
|
||||||
await removeByFilterTester(randomHostVisits, { host: "*.mozilla.org" },
|
await removeByFilterTester(randomHostVisits, { host: ".mozilla.org" },
|
||||||
async () => { for (let uri of remoteUriList) await assertInDB(uri); },
|
async () => { for (let uri of remoteUriList) await assertInDB(uri); },
|
||||||
async () => { for (let uri of checkableArray(remoteUriList)) await checkClosure(uri); },
|
async () => { for (let uri of checkableArray(remoteUriList)) await checkClosure(uri); },
|
||||||
callbackUse, bookmarkedUri(remoteUriList));
|
callbackUse, bookmarkedUri(remoteUriList));
|
||||||
|
@ -167,7 +168,7 @@ add_task(async function test_removeByFilter() {
|
||||||
async () => { for (let uri of localhostUriList) await assertNotInDB(uri); },
|
async () => { for (let uri of localhostUriList) await assertNotInDB(uri); },
|
||||||
callbackUse);
|
callbackUse);
|
||||||
// Case A 5: Local Files
|
// Case A 5: Local Files
|
||||||
await removeByFilterTester(fileVisits, { host: "" },
|
await removeByFilterTester(fileVisits, { host: "." },
|
||||||
async () => { for (let uri of fileUriList) await assertInDB(uri); },
|
async () => { for (let uri of fileUriList) await assertInDB(uri); },
|
||||||
async () => { for (let uri of fileUriList) await assertNotInDB(uri); },
|
async () => { for (let uri of fileUriList) await assertNotInDB(uri); },
|
||||||
callbackUse);
|
callbackUse);
|
||||||
|
@ -185,7 +186,12 @@ add_task(async function test_removeByFilter() {
|
||||||
() => assertInDB(remoteUriList[0]),
|
() => assertInDB(remoteUriList[0]),
|
||||||
callbackUse);
|
callbackUse);
|
||||||
// Case B 3 : Multiple subhosts
|
// Case B 3 : Multiple subhosts
|
||||||
await removeByFilterTester(randomHostVisits, { host: "*.notthere.org" },
|
await removeByFilterTester(randomHostVisits, { host: ".notthere.org" },
|
||||||
|
async () => { for (let uri of remoteUriList) await assertInDB(uri); },
|
||||||
|
async () => { for (let uri of remoteUriList) await assertInDB(uri); },
|
||||||
|
callbackUse);
|
||||||
|
// Case B 4 : invalid local subhost
|
||||||
|
await removeByFilterTester(randomHostVisits, { host: ".org" },
|
||||||
async () => { for (let uri of remoteUriList) await assertInDB(uri); },
|
async () => { for (let uri of remoteUriList) await assertInDB(uri); },
|
||||||
async () => { for (let uri of remoteUriList) await assertInDB(uri); },
|
async () => { for (let uri of remoteUriList) await assertInDB(uri); },
|
||||||
callbackUse);
|
callbackUse);
|
||||||
|
@ -201,7 +207,7 @@ add_task(async function test_removeByFilter() {
|
||||||
callbackUse);
|
callbackUse);
|
||||||
// Case C 2: multiple subhost
|
// Case C 2: multiple subhost
|
||||||
await removeByFilterTester(randomHostVisits,
|
await removeByFilterTester(randomHostVisits,
|
||||||
{ host: "*.mozilla.org",
|
{ host: ".mozilla.org",
|
||||||
beginDate: new Date(2005, 1, 1),
|
beginDate: new Date(2005, 1, 1),
|
||||||
endDate: new Date(2017, 1, 1) },
|
endDate: new Date(2017, 1, 1) },
|
||||||
async () => { for (let uri of remoteUriList) await assertInDB(uri); },
|
async () => { for (let uri of remoteUriList) await assertInDB(uri); },
|
||||||
|
@ -246,11 +252,7 @@ add_task(async function test_error_cases() {
|
||||||
/TypeError: Expected well formed hostname string for/
|
/TypeError: Expected well formed hostname string for/
|
||||||
);
|
);
|
||||||
Assert.throws(
|
Assert.throws(
|
||||||
() => PlacesUtils.history.removeByFilter({host: "*.org"}),
|
() => PlacesUtils.history.removeByFilter({host: "www..org"}),
|
||||||
/TypeError: Expected well formed hostname string for/
|
|
||||||
);
|
|
||||||
Assert.throws(
|
|
||||||
() => PlacesUtils.history.removeByFilter({host: "www.*.org"}),
|
|
||||||
/TypeError: Expected well formed hostname string for/
|
/TypeError: Expected well formed hostname string for/
|
||||||
);
|
);
|
||||||
Assert.throws(
|
Assert.throws(
|
||||||
|
@ -258,7 +260,7 @@ add_task(async function test_error_cases() {
|
||||||
/TypeError: `host` should be a string/
|
/TypeError: `host` should be a string/
|
||||||
);
|
);
|
||||||
Assert.throws(
|
Assert.throws(
|
||||||
() => PlacesUtils.history.removeByFilter({host: ".mozilla.org"}),
|
() => PlacesUtils.history.removeByFilter({host: "*.mozilla.org"}),
|
||||||
/TypeError: Expected well formed hostname string for/
|
/TypeError: Expected well formed hostname string for/
|
||||||
);
|
);
|
||||||
Assert.throws(
|
Assert.throws(
|
||||||
|
@ -273,6 +275,10 @@ add_task(async function test_error_cases() {
|
||||||
() => PlacesUtils.history.removeByFilter({host: "(local files)"}),
|
() => PlacesUtils.history.removeByFilter({host: "(local files)"}),
|
||||||
/TypeError: Expected well formed hostname string for/
|
/TypeError: Expected well formed hostname string for/
|
||||||
);
|
);
|
||||||
|
Assert.throws(
|
||||||
|
() => PlacesUtils.history.removeByFilter({host: ""}),
|
||||||
|
/TypeError: Expected a non-empty filter/
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Helper functions
|
// Helper functions
|
||||||
|
|
|
@ -13842,5 +13842,65 @@
|
||||||
"kind": "boolean",
|
"kind": "boolean",
|
||||||
"keyed": true,
|
"keyed": true,
|
||||||
"description": "Permission requests (showing a permission prompt) by whether they were requested from code handling a user input event."
|
"description": "Permission requests (showing a permission prompt) by whether they were requested from code handling a user input event."
|
||||||
|
},
|
||||||
|
"HTMLEDITORS_WITH_RESIZERS": {
|
||||||
|
"record_in_processes": ["content"],
|
||||||
|
"alert_emails": ["mnakano@mozilla.com"],
|
||||||
|
"bug_numbers": [1452538,1449564],
|
||||||
|
"expires_in_version": "65",
|
||||||
|
"kind": "boolean",
|
||||||
|
"releaseChannelCollection": "opt-out",
|
||||||
|
"description": "Number of HTML editors which has shown object resizers."
|
||||||
|
},
|
||||||
|
"HTMLEDITORS_WHOSE_RESIZERS_USED_BY_USER": {
|
||||||
|
"record_in_processes": ["content"],
|
||||||
|
"alert_emails": ["mnakano@mozilla.com"],
|
||||||
|
"bug_numbers": [1452538,1449564],
|
||||||
|
"expires_in_version": "65",
|
||||||
|
"kind": "linear",
|
||||||
|
"high": 50,
|
||||||
|
"n_buckets": 20,
|
||||||
|
"releaseChannelCollection": "opt-out",
|
||||||
|
"description": "Number of HTML editors whose object resizers are actually used by users."
|
||||||
|
},
|
||||||
|
"HTMLEDITORS_WITH_ABSOLUTE_POSITIONER": {
|
||||||
|
"record_in_processes": ["content"],
|
||||||
|
"alert_emails": ["mnakano@mozilla.com"],
|
||||||
|
"bug_numbers": [1452538,1449564],
|
||||||
|
"expires_in_version": "65",
|
||||||
|
"kind": "boolean",
|
||||||
|
"releaseChannelCollection": "opt-out",
|
||||||
|
"description": "Number of HTML editors which has shown grabber to move absolute positioned elements."
|
||||||
|
},
|
||||||
|
"HTMLEDITORS_WHOSE_ABSOLUTE_POSITIONER_USED_BY_USER": {
|
||||||
|
"record_in_processes": ["content"],
|
||||||
|
"alert_emails": ["mnakano@mozilla.com"],
|
||||||
|
"bug_numbers": [1452538,1449564],
|
||||||
|
"expires_in_version": "65",
|
||||||
|
"kind": "linear",
|
||||||
|
"high": 50,
|
||||||
|
"n_buckets": 20,
|
||||||
|
"releaseChannelCollection": "opt-out",
|
||||||
|
"description": "Number of HTML editors whose grabber to move absolute positioned elements is actually used by users."
|
||||||
|
},
|
||||||
|
"HTMLEDITORS_WITH_INLINE_TABLE_EDITOR": {
|
||||||
|
"record_in_processes": ["content"],
|
||||||
|
"alert_emails": ["mnakano@mozilla.com"],
|
||||||
|
"bug_numbers": [1452538,1449564],
|
||||||
|
"expires_in_version": "65",
|
||||||
|
"kind": "boolean",
|
||||||
|
"releaseChannelCollection": "opt-out",
|
||||||
|
"description": "Number of HTML editors which has shown inline table editing UI."
|
||||||
|
},
|
||||||
|
"HTMLEDITORS_WHOSE_INLINE_TABLE_EDITOR_USED_BY_USER": {
|
||||||
|
"record_in_processes": ["content"],
|
||||||
|
"alert_emails": ["mnakano@mozilla.com"],
|
||||||
|
"bug_numbers": [1452538,1449564],
|
||||||
|
"expires_in_version": "65",
|
||||||
|
"kind": "linear",
|
||||||
|
"high": 50,
|
||||||
|
"n_buckets": 20,
|
||||||
|
"releaseChannelCollection": "opt-out",
|
||||||
|
"description": "Number of HTML editors whose inline table editing UI is actually used by users."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче